Summary
I had a technical interview for an SDE position at Josh Technology Group, where I was asked two LeetCode problems. Despite solving them efficiently, my approach for one question was rejected due to an interviewer's constraint interpretation, leading to my overall rejection.
Full Experience
Yesterday, I had my interview for the SDE position at Josh Technology Group (JTG). The first round was a technical interview where I was asked two main questions:
1st Question:
Remove Nth Node from the End of a Linked List (Leetcode 19)
The requirement was to solve it in O(1) space and with a single traversal. I managed to complete the solution within 20 minutes, and it was working perfectly.
2nd Question:
Convert a Binary Search Tree to a Greater Sum Tree (Leetcode 1038)
This also needed to be solved in O(1) space and with a single traversal. I implemented the solution successfully using an extra variable passed by reference. Although the code was correct and efficient, the interviewer rejected my approach solely because I used a reference variable, stating that it didn't meet the constraints.
After the interview, I spoke with a few other candidates. Interestingly, one of them solved the same problem using a similar approach—also with a reference variable—and their interviewer accepted it. That candidate progressed to the next round, whereas I was rejected.
This experience left me wondering: Are interviews really about skill, or is there an element of luck involved? If luck plays such a significant role, why do people always emphasize that interviews are purely skill-based?
Interview Questions (2)
Remove Nth Node from the End of a Linked List (Leetcode 19)
The requirement was to solve it in O(1) space and with a single traversal.
Convert a Binary Search Tree to a Greater Sum Tree (Leetcode 1038)
This also needed to be solved in O(1) space and with a single traversal.
Summary
I successfully navigated through the online assessment, technical, and hiring manager rounds for an SDE role at Josh Technology Group, ultimately receiving an offer.
Full Experience
My journey with Josh Technology Group began after they reached out for an SDE position. The interview process consisted of three distinct rounds. I started with an online assessment hosted on HackerRank, which presented three coding challenges. I managed to solve all of them within the given time frame, which gave me confidence for the next stages.
Following the online round, I advanced to a technical interview primarily focused on Data Structures and Algorithms. The interviewer first delved into my previous projects, asking insightful questions about my contributions and challenges faced. After that, he presented a coding problem centered around cycle detection in a directed graph. I thoroughly explained my DFS-based approach, detailing how different node states (unvisited, visiting, visited) are used to identify back edges and thus, cycles. We also moved onto a system design problem, specifically 'Design a parking lot system', where I outlined a high-level architecture, discussed potential database schemas, and structured the core classes and functionalities.
The final round was with the hiring manager, which was predominantly behavioral. I was asked to share experiences about challenges I'd faced and how I overcame them, as well as my motivations for wanting to join Josh Technology Group. I articulated my enthusiasm for the company's work and how my skills aligned with their requirements. I was thrilled to eventually receive an offer after successfully completing all interview stages.
Interview Questions (7)
Given two sorted arrays nums1 and nums2 of size m and n respectively, return the median of the two sorted arrays. The overall run time complexity should be O(log (m+n)).
Given an array of integers nums and an integer target, return indices of the two numbers such that they add up to target. You may assume that each input would have exactly one solution, and you may not use the same element twice.
Implement the RandomizedSet class:
RandomizedSet()Initializes theRandomizedSetobject.bool insert(int val)Inserts an itemvalinto the set if not present. Returnstrueif the item was not present,falseotherwise.bool remove(int val)Removes an itemvalfrom the set if present. Returnstrueif the item was present,falseotherwise.int getRandom()Returns a random element from the current set of elements. Each element must have the same probability of being returned.
Given a directed graph, determine if it contains a cycle. Describe and implement an algorithm to detect cycles efficiently.
Design a parking lot system that can manage different types of vehicles (cars, bikes, trucks), multiple levels, different parking spot sizes, and handle entry/exit operations including payment. Consider scalability and core functionalities.
Describe a situation where you experienced failure. What was the situation, what was your role, what did you learn from it, and how did you apply those learnings?
What motivated you to apply for a role at Josh Technology Group? What do you know about our company, and what excites you about this opportunity?
Preparation Tips
My preparation primarily involved a rigorous LeetCode grind for Data Structures and Algorithms problems, focusing on a wide range of topics and difficulties. For system design, I utilized resources like the System Design Primer and various online articles to understand common patterns, scalable architectures, and component interactions. Additionally, I practiced answering behavioral questions using the STAR method to structure my responses effectively, ensuring I could clearly articulate my experiences and learnings.