Infosys:
- Take a string as input from the user. Print the index of the first non-repeating character in the string. Print -1 If there isn’t any such character.
- Take n number of strings as input from the user. (You can take n as input as well.)
RSL:
- Print a number in it’s expanded form.
Ex. 2324 : 2000 300 20 4
- Program to find non-repeating characters from a string
- [Leetcode 66] You are given a large integer represented as an integer array digits, where each digits[i] is the ith digit of the integer. The digits are ordered from most significant to least significant in left-to-right order. The large integer does not contain any leading 0's. Increment the large integer by one and return the resulting array of digits.
- Take an array as input. Print second max difference among the elements of the array.
- Take a year as input. Print if it is a leap year or not.
- Take a string as input and return the string with the count of each character in the string in sequence they occur.
Ex. Input : AAABBCCADDD Expected Output: A3B2C2AD3 - For the given amount, you would have to pay a minimum number of coins of 5’s and 2’s.
- Take an array of length n as input. x an integer as input. Print the smallest number greater than x which is not present in the given array.\
- Take a binary string as input. Sort the string in minimum number of swapping
Ex. Input: 011001 Expected Output: 000111
HCL:
- Take the distance in km as input. Convert it to meters, cm or mm as per users need.
- Count the number of distinct characters in input string.