• Difficulty Level : Hard
• Last Updated : 04 Jun, 2019

Resume filter:  I got an email from a recruiter who asked about my details such as work experience, interests, technical abilities. A few days later, she scheduled a telephone call where she asked some basic questions on complexity, worst case and best case for certain sorting algorithms, some short tricky math problems. You need to answer 8/10 correct to get shortlisted.

After this, I got around 20 days for 1st round of telephonic interview.

Telephonic interview: It was a 45 min hangout call with a Google doc shared. She directly jumped onto the question.
Q1.  Given two strings, A and B, of equal length, find whether it is possible to cut both strings at a common point such that the first part of A and the second part of B form a palindrome.

Extension1. How would you change your solution if the strings could be cut at any point (not just a common point)?
Extension2. Multiple cuts in the strings (substrings to form a palindrome)? Form a palindrome using a substring from both strings. What is its time complexity?
Q2. Come up with some edge test-cases for calculator function performing these operations : (+, -,  *, /)
I was called for onsite interviews 25 days after this round.

Round 1: Given an input stream of boolean values, design a data structure that can support following modules in optimal time-
i) setTrue(index)
ii) setFalse(index)
iii) setAllTrue()
iv) setAllFalse()
v) getIndex(index)

Round 2:Given a list of player names and their scores – {Carl, 70; Alex, 55; Isla, 40}, design a data structure that can support following modules in optimal time-
i) updateEntry(string name)
ii) getEntryFromRank(int rank)

Round 3:
Q1.
Given an array of n integers, find the lexicographically smallest subsequence of length k.
Q2. Given a matrix of people(denoted by small alphabets) and bikes(denoted by capital alphabets), find the nearest bike for a given person.
How will you change your solution if you have to find bikes for a set of people? (assuming multiple bikes can be at the same distance from 1 person)

Round 4:
Q1.
Given an infinite chessboard, find minimum no. of steps for a knight to reach from the origin to (x, y).
Extension  A list of forbidden coordinates are introduced where knight can’t reach. Handle this in your code. Make sure the infinite loop is handled since the board is infinite.

My Personal Notes arrow_drop_up