Coding (Algo and DS) Interview Overview

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 18

Coding (Algorithm & Data

Structure) Interview Overview


Listiarso Wastuargo - 10% Engineer Guide
● What quality companies are
looking for

● Evaluation points
Materials ● Example questions

● Learning materials
What quality companies are
looking for
What quality companies are looking for

1. Communication
2. Problem Solving
3. Coding
4. Verification
Proxy to evaluate those metrics

Communication - Question understanding


- Receiving hints
- Communicate solution

Problem Solving - Brute force solution


- Optimal solution
- Time and space complexity

Coding - Translate idea to code


- Descriptive variable names
- Good indentation
- Bug free

Verification - Dry Run


- Sample test cases
Evaluation points
Communication

1. Do you understand the question quickly


2. Can you explain your solution before writing the code
3. Can you understand hints given by the interviewer
Problem Solving

1. Can you come up with the right solution


a. With hint or without it
b. Iterate from suboptimal to optimal solution
2. Can you come up with the right time and space complexity?
3. Extra: can you give multiple solutions with multiple time and space
complexity?
Coding

1. Can you translate idea in Problem Solving into code


2. Is your code easy to read and understand
a. Indentations
b. Variable namings
c. Modular
3. Can you write your code fast
a. Easy: 5 mins
b. Medium: 8-10 mins
c. Hard: the remaining interview time
Verification

1. How do you verify that your code works


a. Dry run
b. Execute the code + make “unit test”
2. Do you come up with edge cases
3. Do you “run” the code well
Example questions
Group anagrams: question

Given a list of string, group them based on their anagram. A string is anagram
to each other if they contain exactly the same characters, in any permutations.
Group anagrams: solution and discussion
Learning materials
The fundamentals (1)

1. Time and Space Complexity


2. Arrays
3. String
4. Recursion
5. Backtracking
The fundamentals (2)

1. Math
2. Sorting
3. Brute Force
4. Divide and Conquer
5. Greedy
6. Dynamic Programming
7. Graph
Questions

1. https://leetcode.com/problems/task-scheduler
2. https://leetcode.com/problems/lowest-common-ancestor-of-a-binary-tree
3. https://leetcode.com/problems/lru-cache/
4. https://leetcode.com/problems/valid-parentheses/
5. https://leetcode.com/problems/merge-sorted-array/
6. https://leetcode.com/problems/group-anagrams/
Links
1. TLX by TOKI: https://tlx.toki.id/courses
2. USACO Gate by USACO: https://train.usaco.org/
3. LeetCode: https://leetcode.com/explore/

You might also like