Flipkart Interview Questions
- 2of 2 votes
AnswersFollowing sequence is given:
- SK July 07, 2013 in India
1,2,3,4,5,6,8,9,10,12,15,16,18,20,24
In this sequence, each number is multiple of 2,3 or 5 only.
This sequence does not contain 7 & 14 as these number has sequence 7 as multiple.
So, if you are given N find the Nth number of this sequence.| Report Duplicate | Flag | PURGE
Flipkart Senior Software Development Engineer Algorithm - 0of 0 votes
AnswersGiven a list of interval , find the maximum overlaping. For ex if input is 0,5 2,9 8,10 6,9 then ans is 2 as 8,10 overlap in 2,9 and 6,9
- abc February 19, 2013 in India| Report Duplicate | Flag | PURGE
Flipkart Algorithm - 1of 1 vote
AnswersGiven a board of snakes and ladders game, provide an algorithm to find the minimum number of dice rolls required to reach 100 from 1.
- Vikas November 12, 2012 in India| Report Duplicate | Flag | PURGE
Flipkart Software Engineer / Developer Algorithm - 1of 1 vote
AnswersGiven a string s, its roughness is calculated as follows: Let c1 be the letter that appears most frequently in s, and let c2 be the
- ankur3089 October 30, 2012 in India
letter that appears least frequently (c2 must appear at least once). The roughness of s is the number of occurrences of c1
minus the number of occurrences of c2. Write a program to find the minimum possible roughness of a string that can be
achieved if you are allowed to remove up to n characters in a string. Note: you are allowed to modify s by erasing between 0
and n characters, inclusive.
Input
First line of the input will be the string, s followed by a number (n) in next line indicating the maximum number of
modifications allowed
Output
Return the minimum possible roughness that can be achieved by such a modification| Report Duplicate | Flag | PURGE
Flipkart Software Engineer / Developer Algorithm - 0of 0 votes
AnswersSuppose you have given a 2D array having filled with "L" or "W" i.e. either land or water, using DP you have to find it largest land unit in this grid, each cell of land is considered as 1 unit and you can only consider up,down,left or right land units as contiguous to each other not diagonal unit.
- Biswajit Sinha September 09, 2012 in India
Example:
LLLL
LLWL
LWLW
WWLL
in the above mentioned grid the answer will be 8 units| Report Duplicate | Flag | PURGE
Flipkart Software Engineer / Developer Algorithm - 0of 0 votes
AnswersGiven a binary tree , find the sum of all the nodes , which are at a particular level from all of its existing leaves. ( note:- it might be possible a single such node would exist for two different leaf , in that case we need to sum it up only once )
- deadman_22 July 16, 2012 in United States| Report Duplicate | Flag | PURGE
Flipkart Software Engineer / Developer - 0of 0 votes
AnswersSuppose there is a linked list ,how to find it is circular and also find the node where it becomes circular..like say
1->3->4->6->8->0 | | 7->23->5->9
so here 4 is the head where circular linklist starts.
- sujita July 07, 2012 in United States for GGn| Report Duplicate | Flag | PURGE
Flipkart Site Reliability Engineer Algorithm - 2of 2 votes
AnswersGiven N pair of parenthesis. Write an algorithm which would print out all possible permutations possible with those parenthesis given that parenthesis are in correct order (i.e. every open parenthesis is matched with closed parenthesis)
- shadykiller March 06, 2012 in India
For .e.g. .. N =3 should give:
()()()
(()())
()(())
(())()
((()))| Report Duplicate | Flag | PURGE
Flipkart Algorithm - 0of 0 votes
AnswersYou are given 2 dice. Both are fair. One of the dice has no numbers printed on it. You have to label the unmarked dice such that when both the dice are thrown, the sum on the faces is evenly distributed between 1 and 12.
- shadykiller March 06, 2012 in India| Report Duplicate | Flag | PURGE
Flipkart Brain Teasers - 0of 0 votes
AnswersThe columns that I get in a table after a clustering process is not specific but varies from 150 to 210. I need to get the column name that has the max value for each row and add that column name to a target column..
- amruth.s@flipkart.com January 17, 2012 in India
Schema looks like this
cluster_name ---> varchar(20)
col1 ----> decimal
col2 ----> decimal
...
coln ----> decimal
The result of the query should look like this
cluster_name -----> varchar(20)
col_name(that had the max value for that row)------> varchar(20)
col_max(max value across all columns for that row)-------->decimal
should use only mysql query..| Report Duplicate | Flag | PURGE
Flipkart Developer Program Engineer Database - 0of 0 votes
AnswersWrite a program to convert a BST to sorted list. You must use the same tree and make the right child pointer as the next pointer in the list.
- msramachandran October 31, 2011 in India
I think I flunked this one.| Report Duplicate | Flag | PURGE
Flipkart Software Engineer / Developer - 0of 0 votes
AnswersDevelop a hashing algorithm for strings.
- msramachandran October 31, 2011 in India
I replied saying MD5 hashing and converting the hash to a BigInt implementation.| Report Duplicate | Flag | PURGE
Flipkart Software Engineer / Developer Hash Table - 0of 0 votes
AnswersHow to merge K sorted arrays into one array.
- msramachandran October 31, 2011 in India
I explained the second part of external sort and said its in O(N logK). I don't think he understood the time complexity I explained.| Report Duplicate | Flag | PURGE
Flipkart Software Engineer / Developer Algorithm - 0of 0 votes
AnswersHow to find a number in a rotated sorted array.
- msramachandran October 31, 2011 in India
He was looking for the binary search kinda solution| Report Duplicate | Flag | PURGE
Flipkart Software Engineer / Developer Algorithm - 0of 0 votes
AnswersInput : 4 jars and 50 balls of different colors (Red, Green, Yellow, Blue) where each jar can contain a maximum of 100 balls.
- Saurabh October 15, 2011 in India
Problem : When a user draws a red ball he looses his money while if he draws a ball of some other color his money is doubled. Arrange the balls in such a way that the user has highest probability to loose.| Report Duplicate | Flag | PURGE
Flipkart Software Engineer / Developer Probability - 0of 0 votes
AnswersGiven a Binary tree and a pointer to some node in the tree, find the left and right neighbors of the input node. The neighbor nodes are on the same level/depth as of input node.
- Saurabh October 15, 2011 in India
Don't use BFS/level order traversal.
There is no parent pointer.| Report Duplicate | Flag | PURGE
Flipkart Software Engineer / Developer Trees and Graphs - 1of 1 vote
AnswersFind if a binary tree is bst
- anonym October 10, 2011 in -| Report Duplicate | Flag | PURGE
Amazon Flipkart Groupon Software Engineer / Developer Trees and Graphs - 0of 0 votes
AnswersA question on set of pair of processes and scheduling them.
- PsychIdris October 03, 2011 in India
Topological sorting in graphs.| Report Duplicate | Flag | PURGE
Flipkart Software Engineer / Developer Algorithm - 0of 0 votes
AnswersExplain data structure and design for list feature or auto complete suggestion.
- PsychIdris October 03, 2011 in India
Tries and Has map implementation.| Report Duplicate | Flag | PURGE
Flipkart Software Engineer / Developer Data Structures Algorithm - 0of 0 votes
AnswersGiven k sorted streams where each stream could possibly be infinite in length, describe an efficient algorithm to merge the k streams into a new stream (also in sorted order).
- rahul June 25, 2011| Report Duplicate | Flag | PURGE
Flipkart Software Engineer / Developer Algorithm - 0of 0 votes
AnswersQuestion #2) Given a set of KEY->VALUE pairs such that each KEY is unique, describe a method of storing these pairs on disk, and a method for accessing the corresponding VALUE given a KEY. Assume that RAM is fixed at 1gb and the set of pairs requires 40gb.
- rahul June 25, 2011| Report Duplicate | Flag | PURGE
Flipkart Software Engineer / Developer Algorithm - 0of 0 votes
AnswersTo safeguard against the dreaded phenomenon of wall posting while drunk, flipkart is implementing a feature that detects when post content is too garbled to have been done while sober and informs the user that they need to take an online breathalyzer test before being allowed to post.
- rahul June 24, 2011
Unfortunately, there is far too much content for a given set of persons to evaluate by hand. Fortunately, you are a programmer of some repute and can write a program that processes and evaluates wall posts. You realize that such a program would be of great use to society and intend to resolve the problem once and for all. The program you write must compute a score for a body of text, returning this score upon completion.
Your program will be given a list of accepted words and run on one wall post at a time. For each word W in the post, you must find word W' from the list of accepted words such that the number of changes from W to W' is minimized. It is possible that W is already W' and thus the number of changes necessary is zero. A change is defined as replacing a single letter with another letter, adding a letter in any position, or removing a letter from any position. The total score for the wall post is the minimum number of changes necessary to make all words in the post acceptable.
Input Specification
Your program must take a single string argument, representing the file name containing the wall post to analyze. In addition, your program must open up and read the accepted word list from the following static path location:
/var/tmp/twl06.txt
For testing purposes, you may download and examine the accepted word list here. When submitting your code, you do not need to include this file, as it is already present on the machine.
The input file consists entirely of lower case letters and space characters. You are guaranteed that the input file will start with a lower case letter, and that all words are separated by at least one space character. The file may or may not end with a new line character.
Example input file:
tihs sententcnes iss nout varrry goud
You are guaranteed that your program will run against well formed input files and that the accepted word list is identical to the one provided for testing.
Output Specification
Your program must print out the minimum number of changes necessary to turn all words in the input wall post into accepted words as defined by the word list file. Words may not be joined together, or separated into multiple words. A change in a word is defined as one of the following:
1. Replacing any single letter with another letter.
2. Adding a single letter in any position.
3. Removing any single letter.
This score must be printed out as an integer and followed by a single new line.
Example Output (newline after number):
8| Report Duplicate | Flag | PURGE
Flipkart Software Engineer / Developer Algorithm - 0of 0 votes
AnswersCheck whether point lies inside polygon
- rahul June 24, 2011
You are given a convex polygon and an additional point. You know the x and y co-ordinates of all vertices of the polygon and the point. Find if the point is one of the vertices of the polygon in O(log N) time..| Report Duplicate | Flag | PURGE
Flipkart Software Engineer / Developer Algorithm - 0of 0 votes
AnswersGiven n elements & their is dependency between them it can linear or circular or any other dependency you can think of , you to explain the algorithm that tell the write order of execution of all program , he discussed about the data structure , time complexity & algorithm & its really gud question, also if it is circular then deadlock condition occur so no process execute .
- rahul June 20, 2011| Report Duplicate | Flag | PURGE
Flipkart Software Engineer / Developer Algorithm - 0of 0 votes
AnswersWhen implementing >ls a/b/c/./e/../f/./../g/./../h in Java, what data structure will you use for storing a/b/c/./e/../f/./../g/./../h?
- Interviewee April 21, 2011| Report Duplicate | Flag | PURGE
Flipkart Software Engineer in Test Algorithm - -1of 1 vote
AnswersWhat does the following command do in unix:
- Interviewee April 21, 2011
>ls a/b/c/./e/../f/./../g/./../h
Consider a,b,c....g,h to be folders| Report Duplicate | Flag | PURGE
Flipkart Software Engineer in Test Linux Kernel - 0of 0 votes
AnswersFor a binary tree, print all possible paths from root to leaf nodes
- Anonymous April 08, 2011| Report Duplicate | Flag | PURGE
Flipkart Software Engineer / Developer Algorithm - 0of 0 votes
AnswersFind median of an unsorted array (better in nlogn solution is needed)
- Anonymous April 08, 2011| Report Duplicate | Flag | PURGE
Flipkart Software Engineer / Developer Algorithm