Similar Collections


We are trying to list out the most frequently asked interview problems or the problem given in the coding rounds of IT giants.

questions

Title
Write a program that counts frequency of each letter in the string (string consists lowercase letters only)
Given an array consisting only zeros, ones and twos. Give an algorithm for sorting the array in O(n) time complexity ( in the sorted array, zeros will be at starting ,then the ones & then the twos)
Given an unsorted array A of size N of non-negative integers, find a continuous sub-array which adds to the given number
Given a binary string, write an algorithm to find the number of patterns of form 1[0]1 where [0] represents any number of zeroes (minimum requirement is one 0) there should not be any other character except 0 in the [0] sequence
Given an input line, capitalize first and last letter of each word in the given line. It\'s provided that the input line is in lowercase
Given an array of jobs where every job has a deadline and a profit. Profit can be earned only if the job is finished before the deadline
Given a matrix with zeros and ones, one enters the matrix at cell (0, 0) in left to right direction. Whenever one encounters a 0 he retains in the same direction, if one encounters a 1 he has to change direction to the right of current direction and change that 1 value to 0
Given a number N, write a function which generates all n-bit gray code sequences, a gray code sequence is a sequence such that successive patterns in it differ by one bit
Given an array of integers, find and print the maximum number of integers you can select from the array such that the absolute difference between any two of the chosen integers is less than or equal to 1
total questions: 9

Questions

9

Views

265

Best Answers

299

Points

5