Round 1
Questions:
- Remove Linked List Elements
- Solved in 10 mins with O(N) time complexity and O(1) space optimization.
- Remove All Occurrences of a Substring
- Solved using two approaches: one with STL and one iteratively. Overall time complexity is O(N).
- Discussed corner test cases for both questions.
Candidate's Approach
- For the first question, I implemented a single pass solution to remove elements from the linked list.
- For the second question, I utilized both the STL for string manipulation and an iterative method to ensure all occurrences of the substring were removed effectively.
Interviewer's Feedback
- The feedback from HR indicated that they were not inclined to move forward due to a perceived inability to solve the second question and struggles with basic problem-solving skills.