This was an Entry level Software Engineer role.
Phone screen:
There is a language, where alphabets are given as list of strings. Given the list of words, sort it alphabetically as per the order in that language.
E.g.
Alphabets : [ba, aa, cb, abc, d, dd]
Input : [cbba, abccb, aaba, baaa]
Output : [baaa, aaba, cbba, abccb]
Interviewer also mentioned that, there will be only inputs which could be formed uniquely by the alphabets given.
E.g. ddd could be formed by alphabets like [d, d, d], [d, dd], [dd, d], such inputs will be invalid.
Feedback : Positive
Round 2:
I was asked about Collatz conjecture.
Given a positive integer n, the task is to find whether this number reaches to 1 after performing following two operations:-
If n is even, then n = n/2.
If n is odd, then n = 3*n + 1.
Repeat above steps, until it becomes 1.
There are words available in dictonary. Given a source word, check if we can reach out to the destination word, given we are allowed to modify one character at a time. If possible, print out the shortest iteration to reach from source to destination word.
In the dictonary, all words are of same length.
E.g. -
Dictionary : [cat, bat, mat, car, bar, sky, tea]
Source : cat, destination : bar
Output : cat -> bat -> bar
Feedback : Positive
Round 3
Design an alert trigger system.
User will execute the API start_alert("stock_name", lower_bound_threshold, upper_bound_threshold), and then respective stock price which is falling past lower threshold or raising above upper threshold will be notified to the user.
User will execute the API stop_alert("stock_name") and subsequent price update notification won't be sent to the user.
Feedback : I directly jumped to the optimal approach, where as I should have elaborate a bit more about other approaches, pros and cons of the both, and then decide why I am picking up a certain way for my design.
They decided not to move to the next round.