Category: snippet

Reverse the words in the given String

Reverse the words in the given String Given a string S as the input Write a program to print the reverse order of the words in the string S.Input Format:The first line contains S.Output Format:The first line contains the words in the reverse order.Boundary Conditions:1 <= Length of S <= 100Example Input/Output 1:Input:I Love IndiaOutput:India

Super Reduced String

Super Reduced String Steve has a string, , consisting of  lowercase English alphabetic letters. In one operation, he can delete any pair of adjacent letters with same value. For example, string “aabcc” would become either “aab” or “bcc” after operation. Steve wants to reduce  as much as possible. To do this, he will repeat the above operation as many times as

Interlace odd / even from A to B.

     Interlace odd / even from A to B.                                            Two numbers A and B are passed as input.A number N is also passed as the input.The program must print the odd numbers from