30 days of code https://www.hackerrank.com

Day 6

 

Task
Given a string,S , of length N  that is indexed from 0 to N-1, print its even-indexed and odd-indexed characters as 2 space-separated strings on a single line (see the Sample below for more detail).

Note: is considered to be an even index.

Sample Input

Sample Output


My code

official answer:

Day 8

Sample Input

Sample Output

my answer

official

Day 12: Inheritance

Day 14: Scope

The absolute difference between two integers

Day 15: Linked List

 

Leave a Reply

Your email address will not be published.