mirror of
https://github.com/yangshun/tech-interview-handbook.git
synced 2026-04-14 18:40:14 +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.
|
||||
|
||||
Reference in New Issue
Block a user