Expansion of String-Skillrack


JAVA Solution

import java.util.*;
public class Hello {
    public static void main(String[] args) {
        Scanner s = new Scanner(System.in);
        String str = s.next();
        int len = str.length()-1;
        while(len>=0)
        {
            System.out.print(str.substring(len));
            len--;
        }
    }
}


Comments

Popular posts from this blog

First Unique Character in a String

Balanced Binary Tree

Majority Element

Sequential Digits