Skip to content
Related Articles

Related Articles

FourKites Interview Experience (Pool-Campus)

View Discussion
Improve Article
Save Article
  • Difficulty Level : Expert
  • Last Updated : 31 Aug, 2018


Ques 1 -> Ordered Substrings 

You are given a string X. You have to generate the set (all unique) of all the substrings of X and then sort that set lexicographically. Now to have to tell the rank of the string X in the new set formed.

Note: String X contains only lowercase English letters.

eg : “eren”

Lexicograhically Sorted set of unique substrings of X = {“e”, “en”, “er”, “ere”, “eren”, “n”, “r”, “re”, “ren”}

Rank of “eren” = 5

Note: Time complexity matters, optimize your algorithm


Ques 2 -> Walls

Consider N walls, each of unit width, situated next to each other.

You have to select any two walls i and j (1<=i, j<=N) such that if you break all walls except i and j and fill the spaces between them with water, then the amount of water stored is maximum.

Write a program to find the maximum amount of water that can be accumulated between the walls.

eg: 1 2 3 4 5

Ans: we choose wall 2 and 5, the amount of water that can be stored will be the distance between walls i.e (5-2-1) = 4 which is maximum.


They were having two different set, in set 2, the second question was:


Ques 2-> Beautiful strings

You know vowels (a, e,  i,  o, u)  A number is given N, You have to generate all string of length N from vowels and tell the number of unique strings generated lexicographically.



The strings generated {“a”, “e”, “i”, “o”, “u”} = 5


The strings generated {“aa”, “ae”, “ai”, “ao”, “au”, “ee”, “ei”, “eo”, “eu”, “ii”, “io”, “iu”, “oo”, “ou”, “uu”} = 15



At first, I made him discuss my projects, I explained my projects thoroughly, he became very happy with my projects. The interviewer was a youth and experienced engineer working with Fourkites and asked really smart questions based on what I was explaining on my projects. ( Btw this is the only part where GFG can’t help you).

Then he asked 2 coding questions and 1 DBMS question

Ques-> 1: An array is given with redundant numbers. You have to save the unique numbers in that array only without using any extra space.

You have to tell him the optimized approach.

Ques-> 2: When you shoot the aim board the value you get is the multiplication of both adjacent with the addition of the shooted aim board. You have to find the maximum value you can generate.

NOTE: For first and last aim board only one adjacent is there so consider other as 1.

eg: 3 2 5 4 1

when you shoot 2, the value generated is 3*5 + 2 and so on…

Then, You have to tell him the order in which you will shoot. (BTW this was DP problem)

Ques-> 3: You have to design a database for a data center, which contains racks and the racks contain servers, the type of the servers were given.

Then he told me to normalize the table, but after normalizing, there were some problems arose and actually, I solved all of those maybe that was my day.

The session went on for 80 – 90 mins. Towards the end, he told me that he liked how passionately I was explaining my work and projects mentioned in Resume and the overall interview was very good, he was actually impressed.



The interviewer was the director sir itself, asked 3 questions and discussed my internship project

Ques-> 1: A tree is given, what you have to do is you have to make all leaf nodes 0, and to the just upper node you have to save the value of both children, and then return the value of node + the previous value to up and save …

You have to write code, then I was using extra O(1) space to save the temporary value of the node in a variable to return, then he asked me to do question without any extra space.

Ques-> 2: The peoples are represented by nodes and each edge means they have taken a selfie with a phone, now that phone is lost and you have find out the owner of the phone lying in the graph.


Ques-> 3: You have given a new mobile phone and a dictionary, now you have to design a keyboard software, i.e. when you write a word eg. ‘t’, it will probabilistically predict the top 5 ranked words starting with letter ‘t’ and recommend them to the user, he asked me the approach and how I will use probability in it.

{ I actually used the Presentation Layer: Data Compression, context-dependent-coding concept to answer this question, which says some characters often occur adjacent to each other i.e. ‘t’ is generally followed by ‘h’, ‘q’ is generally followed by ‘u’.}

The session went on for 80 – 90 mins.

By the end of the round, he asked if I had any questions for him.


Round 4: (HR ROUND)

This round was just a formality.


Finally, I was 1 of the 6 candidates selected for FourKites, Chennai, out of 39 students interviewed there.

This Experience is contributed by Rachit Yadav, Hitesh Sarangal

My Personal Notes arrow_drop_up
Recommended Articles
Page :

Start Your Coding Journey Now!