# MindTickle Interview Experience Off Campus

I applied on linkedin in Feb 2019 and received a phone from HR in May. It was a basically a screening call and she asked about my projects, internship and the language in which I code and also told about company’s products, mission, tech stack that they use etc. and scheduled a telephonic interview 2-3 days later.

Round 1 (Telephonic): The first round was a DS, Algo round which started with a brief introduction of myself and the projects that I have done. Then he asked the following ques :

1. Find the next greatest element on the right side of the element in the array.
Approach: Traverse the array from the end to start and keep track of the maximum element found so far, at every index check if the greatest element found so far is greater than the current element, if yes then update the next greatest element of ith index to that greatest element else put next greatest element of ith index to -1
2. Find the next greater element on the right side of the element in the array, this was a slight modification of the above problem where we have to find the next greater and not the next greatest.   https://www.geeksforgeeks.org/next-greater-element/
3. You are given n days and for each day (di) you could either perform a high effort tasks (hi) or a low effort tasks (li) or no task with the constraint that you can choose a high-effort tasks only if you chose no task on the previous day. Find the maximum amount of tasks you can perform within these n days.   https://www.geeksforgeeks.org/dynamic-programming-high-effort-vs-low-effort-tasks-problem/

I was able to write code for all the three problems

Round 2 (Telephonic): This was a coding round in which I have to write the pseduo code.

Prblem Statement : You are the given a pdf file with n slides (pages) and a third party service (rest api) which contains two functions :

1. uploadFile(pdf)  : it takes the pdf file as input and returns the media id
2. getImage(media id, slide_no, format) : it takes the media id, slide no of the pdf whose image we want and the format in which we want the image like png, jpeg etc.

I had to write my own function which uses (calls) above two rest functions to upload a file on the server and get the images for all the slides in the pdf.

The pseudo code would be assessed on the following criterias:
Correctness
Should cover all the cases
Efficient
Modular
Approach : the catch here is to use threads while getting the images of the slides i.e, we can get all images simultaneoulsy using multiple threads and we don’t have to wait for the previous images to be extracted to call the next one.
I was able to think of the multithreading approach and after this round I was called for the onsite interviews.

Round 3 (Face to Face): This round was with the technical product manager. He asked various DS, Algo ques, puzzles and the questions regarding my internship project.

1. There is a n x m grid and a dice placed at (n – 1, m – 1). Two players are playing with alternate turns and the player who reaches (0, 0) first (on whose turn the dice reaches (0, 0) first ) will win the game. In any move a player can move the dice either horizontally left or vertically down any no. of steps. I had to devise a strategy in which player starting first will win and which are the cases in which player starting first cannot win. This was not a programming ques but a logical one.
Approach : Always try to place the dice on diagonal (x, x) position when its your opponent’s ( player starting 2nd ) turn, so that when he move any place from diagonal you can always place the dice on diagonal again in the next move. In this way we can ensure that player one always win except the case when (n – 1, m – 1) is itself a diagonal i.e, n – 1 = m – 1 or we can say its a square board because in that case your opponent will try to make you move the dice when it is on diagonal bcoz both are playing optimally. This can be difficult to think so take your time and think about it twice.
2. Given a running stream of integers, find the k’th largest element everytime a new element occurs.   https://www.geeksforgeeks.org/kth-largest-element-in-a-stream/
3. Given two strings of varying lengths, I had to tell whether they are similar or not. Property of the string is that whenever there is an underscore (‘_’) at any index we discard the character at immediate left position i.e, is string  = “A_B_CD_” then string after discrading underscores and corresponding characters would be “C” because “A_”, “B_”, “D_”  would be discarded. other example string = “AB__” after reduction string would be “” i.e, empty string. “A__” is an invalid string we have no. of underscores are greater than the no. of characters. Cannot use extra space (stack based solution was not accepted).
Approach : Traverse from the end of both strings and do some checking of underscore and some other conditions. Think it twice and it is not a difficult problem. I had to code the problem on the ide in my laptop and luckily I was able to do it.

I was able to solve all the three ques completely

Round 4 (Face to Face) : This round was also on DS, Algo and some Java related things.

1. Given a no. ‘k’ and a sum ‘s’. I had to tell the no. of paths in an infinite k-ary tree that sum to ‘s’. Every node contains k children and weights of the edges between the children are 1, 2, 3, …, k i.e every node has child with weight 1, 2, … k.Approach : Initially I gave the backtracking solution but further I gave an optimised DP solution.
2. This was a modification of the above problem where I had to tell the no. of paths in an infinte k-ary tree that to sum ‘s’ and there is at least one edge having value greater than ‘m’. Given ‘k’, ‘s’ and ‘m’. I find this problem tough and was not able to solve it.

In the above problems only k was given and not the tree.

3.  He asked some Java related ques like automatic garbage collection, how JVM works etc.

After all the rigorous rounds, I am really happy to be an upcoming MindTickler !

Write your Interview Experience or mail it to contribute@geeksforgeeks.org

My Personal Notes arrow_drop_up

Check out this Author's contributed articles.

If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to contribute@geeksforgeeks.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.

Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.

Article Tags :

2

Please write to us at contribute@geeksforgeeks.org to report any issue with the above content.