Round type: Online interview (DSA + project)
Profile: SDE-1
Result: Shortlisted
HashMap internals: Talked about array + bucket (linked list/tree), hashCode → index, collision handling, load factor, resizing, equals contract, fail-fast iterators.
System health monitoring: Host (CPU, memory, disk, net), app (p50/p95 latency, error rate, RPS), DB (connections, slow queries, locks), logs/alerts; tools: Prometheus + Grafana, health checks, uptime pings.
Linked List Cycle (detect + start node)
Ask: Given head, detect if cycle exists; if yes, return start node.
Approach: Floyd’s tortoise–hare to detect. On meeting, move one pointer to head; advance both one step → meet at cycle start.
Complexity: O(n) time, O(1) space.
Word Ladder II (all shortest paths)
Ask: Return all shortest transformation sequences from beginWord to endWord.
Approach: BFS to build level graph + parent map (only next words at current BFS depth). Then backtrack DFS from endWord to collect paths.
Complexity: O(N·L²) typical (N words, word length L), space for graph + paths.
Convert number into words (up to 20 digits)
Ask: Integer to English words, large range (handle billions/trillions).
Approach: Chunk by thousands; map 0–19 and tens; compose with units: thousand, million, billion, trillion (extend as needed to cover 20 digits).
Edge cases: 0, negatives (optional), exact hundreds with “and” (style choice).
Complexity: O(#digits).
Edge Cases Discussed
Linked list: 0/1 node, cycle at head, cycle in middle.
Word Ladder: no path, large dictionary, avoid revisiting previous levels.
Number words: 0, trailing zeros in chunks, very large values.
Tips
State complexities up front.
For Word Ladder II, emphasize level-by-level BFS and pruning to keep only minimal-distance parents.
For HashMap, mention resize trigger and treeification (JDK 8) at high collision counts.
#leetcode #InterviewExperience #SDE1 #DSA #Algorithms #DataStructures #Java #SystemDesign #CodingInterview #HashMap #BFS #DFS #WordLadder #LinkedList #Monitoring #Observability #BigO