[Basic] Find k-th character in string
Given a decimal number m. Convert it in binary string and apply n iterations, in each iteration 0 becomes 01 and 1 becomes 10. Find kth character in the string after nth iteration.
More …Given a decimal number m. Convert it in binary string and apply n iterations, in each iteration 0 becomes 01 and 1 becomes 10. Find kth character in the string after nth iteration.
More …Given an array.Print all numbers less than k in the array, with the fact that absolute difference between any adjacent digits should be 1.
More …Two strings are given. Modify 1st string such that all the common characters of the 2nd strings have to be removed and the uncommon characters of the 2nd string have to be concatenated with uncommon characters of the 1st string.
More …Given an array of penalties, an array of car numbers and also the date. The task is to find the total fine which will be collected on the given date. Fine is collected from odd-numbered cars on even dates and vice versa.
More …Given an array of n words. Some words are repeated twice, we need count such words.
More …Given an array of integers (both odd and even), the task is to sort them in such a way that the first part of the array contains odd numbers sorted in descending order, rest portion contains even numbers sorted in ascending order.
More …Given an array arr[] of n integers, construct a Product Array prod[] (of same size) such that prod[i] is equal to the product of all the elements of arr[] except arr[i].
More …Given an integer N, find sum of all digits of N.
More …Given an array, find maximum and minimum elements from the array.
More …Given an array of integers, find a combination of four elements in the array whose sum is equal to a given value X.
More …Find and print the uncommon characters of the two given strings. Here uncommon character means that either the character is present in one string or it is present in other string but not in both. The strings contain only lowercase characters and can contain duplicates.
More …Given a string, find the maximum occurring character in the string. If more than one character occurs maximum number of time then print the lexicographically smaller character.
More …You are given N strings of alphabet characters and the task is to find their matching decimal representation as on the shown keypad. Output the decimal representation corresponding to the string. For ex: if you are given “amazon” then its corresponding decimal representation will be 262966.
More …Given a number n, Write a program that generates and prints all binary numbers with decimal values from 1 to n.
More …Given two arrays A and B, find union between these two array. If there are repetitions, then only one occurrence of element should be printed in union.
More …