Panda Guru LogoPanda
Guru

Jumbotail || SDE-1 Interview experience

Round 1: DSA + Behavioral

Questions:

// Example code for cycle detection in a linked list class ListNode { int val; ListNode next; ListNode(int x) { val = x; } } public class Solution { public boolean hasCycle(ListNode head) { ListNode slow = head; ListNode fast = head; while (fast != null && fast.next != null) { slow = slow.next; fast = fast.next.next; if (slow == fast) { return true; } } return false; } }
Candidate's Approach

I used the hare and tortoise algorithm to solve the cycle detection problem. During the interview, I accidentally deleted the class name while pasting my code into the IDE, which caused an error. After realizing the mistake, I reset the IDE and pasted the code again, which ran successfully. I handled the provided test cases without issues.

Interviewer's Feedback

I received feedback from HR stating that I was rejected due to insufficient debugging skills. Although I answered the theoretical concepts well, my inability to debug the code during the interview was a significant factor in the decision.