Given an array of size n, containing every element from 1 to n+1, except one. Find the missing element.
483Given a cube of size n*n*n (i.e made up of n^3 smaller cubes), find the number of smaller cubes on the surface. Extend this to k-dimension.
520You are given some denominations of coins in an array (int denom[])and infinite supply of all of them. Given an amount (int amount), find the minimum number of coins required to get the exact amount. What is the method called?
447Given an array of size n. It contains numbers in the range 1 to n. Each number is present at least once except for 1 number. Find the missing number
551Given an array all of whose elements are positive numbers, find the maximum sum of a subsequence with the constraint that no 2 numbers in the sequence should be adjacent in the array. So 3 2 7 10 should return 13 (sum of 3 and 10) or 3 2 5 10 7 should return 15 (sum of 3, 5 and 7)
562Given n red balls and m blue balls and some containers, how would you distribute those balls among the containers such that the probability of picking a red ball is maximized, assuming that the user randomly chooses a container and then randomly picks a ball from that.
431Given a Binary Search Tree, write a program to print the kth smallest element without using any static/global variable. You can?t pass the value k to any function also.
410You are given a dictionary of all valid words. You have the following 3 operations permitted on a word: delete a character, insert a character, replace a character. Now given two words - word1 and word2 - find the minimum number of steps required to convert word1 to word2. (one operation counts as 1 step.)
463Given an array of size n. It contains numbers in the range 1 to n. Find the numbers which aren?t present.
484Given an array of size n. It contains numbers in the range 1 to n. Each number is present at least once except for 2 numbers. Find the missing numbers.
596Given an array of size n+1 which contains all the numbers from 1 to n.Find the number which is repeated in O(n) time.How do you proceed with the same with floating numbers from 0 to 1 instead of 1 to n?
463Post New Amazon Programming Languages AllOther Interview Questions
How to convert a string to lowercase in php?
Define What are the reasons for geotechnical site investigations in Uganda?
What is attach ?
In Future how the role of WEBLOGIC in realtime ?
How big was your fact table
I am refused L1-B visa filed by my employer on May 09 by US consulate Chennai. When i am eligible to apply L1-B visa again through my employer?
What is debit and credit note?
Define slip?
what are your expectations from the company?
How do I wipe my hard drive from command prompt?
How will you react when, while consulting a SAS documentation manual to get an answer to a problem, someone says hey, I thought you were supposed to know all that stuff already, and not have to look it up in a book?
Why to use express.js?
What is the main downfall of the Carrier Sense Multiple Access (CSMA) method? How do Collision Detection (CD) methods help alleviate this problem?
what is organic profit? and how it is calculated?
Which is the man like ape found in borneo and sumatra?