mirror of
https://github.com/yangshun/tech-interview-handbook.git
synced 2026-04-04 03:18:05 +08:00
website: add front matter
This commit is contained in:
@@ -1,4 +1,7 @@
|
||||
# Arrays
|
||||
---
|
||||
id: array
|
||||
title: Array
|
||||
---
|
||||
|
||||
#### Hard
|
||||
|
||||
|
||||
@@ -1,4 +1,7 @@
|
||||
# Bit Manipulation
|
||||
---
|
||||
id: binary
|
||||
title: Binary
|
||||
---
|
||||
|
||||
- How do you verify if an interger is a power of 2?
|
||||
- Write a program to print the binary representation of an integer.
|
||||
@@ -1,4 +1,7 @@
|
||||
# Dynamic Programming
|
||||
---
|
||||
id: dynamic-programming
|
||||
title: Dynamic Programming
|
||||
---
|
||||
|
||||
- Given a flight itinerary consisting of starting city, destination city, and ticket price (2D list) - find the optimal price flight path to get from start to destination. (A variation of Dynamic Programming Shortest Path)
|
||||
- Given some coin denominations and a target value `M`, return the coins combination with the minimum number of coins.
|
||||
|
||||
@@ -1,4 +1,7 @@
|
||||
# Geometry
|
||||
---
|
||||
id: geometry
|
||||
title: Geometry
|
||||
---
|
||||
|
||||
- You have a plane with lots of rectangles on it, find out how many of them intersect.
|
||||
- Which data structure would you use to query the k-nearest points of a set on a 2D plane?
|
||||
|
||||
@@ -1,4 +1,7 @@
|
||||
# Graph
|
||||
---
|
||||
id: graph
|
||||
title: Graph
|
||||
---
|
||||
|
||||
- Given a list of sorted words from an alien dictionary, find the order of the alphabet.
|
||||
- Alien Dictionary Topological Sort question.
|
||||
|
||||
@@ -1,4 +1,9 @@
|
||||
# Hash Table
|
||||
---
|
||||
id: hash-table
|
||||
title: Hash Table
|
||||
---
|
||||
|
||||
Hash Table
|
||||
|
||||
- Describe an implementation of a least-used cache, and big-O notation of it.
|
||||
- A question involving an API's integration with hash map where the buckets of hash map are made up of linked lists.
|
||||
|
||||
@@ -1,4 +1,7 @@
|
||||
# Heap
|
||||
---
|
||||
id: heap
|
||||
title: Heap
|
||||
---
|
||||
|
||||
- Merge `K` sorted lists together into a single list.
|
||||
- Given a stream of integers, write an efficient function that returns the median value of the integers.
|
||||
|
||||
@@ -1,4 +1,7 @@
|
||||
# Interval
|
||||
---
|
||||
id: interval
|
||||
title: Interval
|
||||
---
|
||||
|
||||
- Given a list of schedules, provide a list of times that are available for a meeting.
|
||||
|
||||
|
||||
@@ -1,4 +1,7 @@
|
||||
# Linked List
|
||||
---
|
||||
id: linked-list
|
||||
title: Linked List
|
||||
---
|
||||
|
||||
- Given a linked list, in addition to the next pointer, each node has a child pointer that can point to a separate list. With the head node, flatten the list to a single-level linked list.
|
||||
- [Source](http://blog.gainlo.co/index.php/2016/06/12/flatten-a-linked-list/)
|
||||
|
||||
@@ -1,4 +1,7 @@
|
||||
# Math
|
||||
---
|
||||
id: math
|
||||
title: Math
|
||||
---
|
||||
|
||||
- Create a square root function.
|
||||
- Given a string such as "123" or "67", write a function to output the number represented by the string without using casting.
|
||||
|
||||
@@ -1,4 +1,7 @@
|
||||
# Matrix
|
||||
---
|
||||
id: matrix
|
||||
title: Matrix
|
||||
---
|
||||
|
||||
- You're given a 3 x 3 board of a tile puzzle, with 8 tiles numbered 1 to 8, and an empty spot. You can move any tile adjacent to the empty spot, to the empty spot, creating an empty spot where the tile originally was. The goal is to find a series of moves that will solve the board, i.e. get `[[1, 2, 3], [4, 5, 6], [7, 8, - ]]` where - is the empty tile.
|
||||
- Boggle implementation. Given a dictionary, and a matrix of letters, find all the words in the matrix that are in the dictionary. You can go across, down or diagonally.
|
||||
|
||||
@@ -1,4 +1,7 @@
|
||||
# Object-Oriented Programming
|
||||
---
|
||||
id: oop
|
||||
title: Object-Oriented Programming
|
||||
---
|
||||
|
||||
- How would you design a chess game? What classes and objects would you use? What methods would they have?
|
||||
- How would you design the data structures for a book keeping system for a library?
|
||||
|
||||
@@ -1,4 +1,7 @@
|
||||
# Permutation
|
||||
---
|
||||
id: permutation
|
||||
title: Permutation
|
||||
---
|
||||
|
||||
- You are given a 7 digit phone number, and you should find all possible letter combinations based on the digit-to-letter mapping on numeric pad and return only the ones that have valid match against a given dictionary of words.
|
||||
- Give all possible letter combinations from a phone number.
|
||||
|
||||
@@ -1,4 +1,7 @@
|
||||
# Queue
|
||||
---
|
||||
id: queue
|
||||
title: Queue
|
||||
---
|
||||
|
||||
- Implement a Queue class from scratch with an existing bug, the bug is that it cannot take more than 5 elements.
|
||||
- Implement a Queue using two stacks. You may only use the standard `push()`, `pop()`, and `peek()` operations traditionally available to stacks. You do not need to implement the stack yourself (i.e. an array can be used to simulate a stack).
|
||||
|
||||
@@ -1,4 +1,7 @@
|
||||
# Sorting and Searching
|
||||
---
|
||||
id: sorting-searching
|
||||
title: Sorting and Searching
|
||||
---
|
||||
|
||||
- Sorting search results on a page given a certain set of criteria.
|
||||
- Sort a list of numbers in which each number is at a distance `K` from its actual position.
|
||||
|
||||
@@ -1,4 +1,7 @@
|
||||
# Stack
|
||||
---
|
||||
id: stack
|
||||
title: Stack
|
||||
---
|
||||
|
||||
- Implementation of an interpreter for a small language that does multiplication/addition/etc.
|
||||
- Design a `MinStack` data structure that supports a `min()` operation that returns the minimum value in the stack in O(1) time.
|
||||
|
||||
@@ -1,4 +1,7 @@
|
||||
# String
|
||||
---
|
||||
id: string
|
||||
title: String
|
||||
---
|
||||
|
||||
- Output list of strings representing a page of hostings given a list of CSV strings.
|
||||
- Given a list of words, find the word pairs that when concatenated form a palindrome.
|
||||
|
||||
@@ -1,4 +1,7 @@
|
||||
# Topics
|
||||
---
|
||||
id: topics
|
||||
title: Topics
|
||||
---
|
||||
|
||||
## Arrays
|
||||
|
||||
|
||||
@@ -1,4 +1,7 @@
|
||||
# Tree
|
||||
---
|
||||
id: tree
|
||||
title: Tree
|
||||
---
|
||||
|
||||
- Find the height of a tree.
|
||||
- Find the longest path from the root to leaf in a tree.
|
||||
|
||||
@@ -1,3 +1,8 @@
|
||||
---
|
||||
id: behavioral
|
||||
title: Behavioral
|
||||
---
|
||||
|
||||
# Behavioral
|
||||
|
||||
Learn the [STAR](https://en.wikipedia.org/wiki/Situation,_task,_action,_result) format. From Wikipedia:
|
||||
|
||||
@@ -1,3 +1,8 @@
|
||||
---
|
||||
id: cover-letter
|
||||
title: Cover Letter
|
||||
---
|
||||
|
||||
# Cover Letter
|
||||
|
||||
- A short introduction describing who you are and what you're looking for.
|
||||
|
||||
@@ -1,4 +1,7 @@
|
||||
# Interview Formats
|
||||
---
|
||||
id: interview-formats
|
||||
title: Interview Formats
|
||||
---
|
||||
|
||||
The following interview formats are based on my experience interviewing with Bay Area companies. Formats would differ slightly depending on the roles you are applying to. Many companies like to use [CoderPad](https://coderpad.io/) for collaborative code editing. CoderPad supports running of the program, so you might be asked to fix your code such that it can be run. For front end interviews, many companies like to use [CodePen](https://codepen.io/), and it will be worth your time to familiarize yourself with the user interfaces of such web-based coding environments.
|
||||
|
||||
|
||||
@@ -1,4 +1,7 @@
|
||||
# Negotiation
|
||||
---
|
||||
id: negotiation
|
||||
title: Negotiation
|
||||
---
|
||||
|
||||
### Ten Rules of Negotiation
|
||||
|
||||
|
||||
@@ -1,4 +1,7 @@
|
||||
# Psychological Tricks
|
||||
---
|
||||
id: psychological-tricks
|
||||
title: Psychological Tricks
|
||||
---
|
||||
|
||||
Here are some psychological tricks that will help you ace a job interview.
|
||||
|
||||
|
||||
@@ -1,4 +1,7 @@
|
||||
# Questions to Ask
|
||||
---
|
||||
id: questions-to-task
|
||||
title: Questions To Ask
|
||||
---
|
||||
|
||||
Here are some good questions to ask at the end of the interview, extracted from various sources. The ones in **bold** are the ones that tend to make the interviewer go "That's a good question" and pause and think for a bit.
|
||||
|
||||
|
||||
@@ -1,4 +1,7 @@
|
||||
# Resume
|
||||
---
|
||||
id: resume
|
||||
title: Resume
|
||||
---
|
||||
|
||||
The following content is by Christina Ng and rephrased for the purpose of this handbook. You can follow her on [Medium](https://medium.com/@christinang89) or [Quora](https://www.quora.com/profile/Christina-Ng).
|
||||
|
||||
|
||||
@@ -1,4 +1,7 @@
|
||||
# Self Introduction
|
||||
---
|
||||
id: self-introduction
|
||||
title: Self Introduction
|
||||
---
|
||||
|
||||
You can rephrase the question like this:
|
||||
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
Interview Cheatsheet
|
||||
==
|
||||
---
|
||||
id: interview-cheatsheet
|
||||
title: Interview Cheatsheet
|
||||
---
|
||||
|
||||
This is a straight-to-the-point, distilled list of technical interview Do's and Don'ts, mainly for algorithmic interviews. Some of these may apply to only phone screens or whiteboard interviews, but most will apply to both. I revise this list before each of my interviews to remind myself of them and eventually internalized all of them to the point I do not have to rely on it anymore.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user