- Published on
Meta | E4 | Phone Screening
- Author
- Shared Anonymously
Just had my screening some time back. 2 questions were asked
- https://leetcode.com/problems/valid-palindrome-ii/description/ - Wrote the optimal code and explained the code. Told space and time complexity. Did a high level dry run.
- https://leetcode.com/problems/binary-tree-vertical-order-traversal/description/ - Explained the best approach. Told him that BFS is better [explained the BFS algo]. Instantly a followup, why bfs is dfs. Told the reason to him, explained how dfs will work and said that I will proceed with BFS. But made a mistake here, after explaining the logic of dfs, I somehow started the code for DFS [maybe I was nervous]. Interviewer pointed it out. I just came to sense. Started coding for bfs, completed the code. Did a dry run and explained the space and time complexity.
Do you think this mistake of coding DFS after telling BFS is good and intent to write code for same can cause the issue?
YOE: ~4
Location - London [Applied from India]
Applied online via career portal
Edit: Got positive response, Moving to Onsite. Three minor issues to work on me
- The DFS vs BFS kind of issue
- Proper variable name - Suprisingly, I asked interviewer to confirm whether variable name makes any diff if not will use name abbr. He highlighted using vl for vertical :P
- Proper testing was not done for Q1 - Need to take care of this going forward.
Report • Mark as Helpful