In this card, we are going to help you understand the general concept of Binary Search
.
- Oct 10, 2018...more
刷题总结 - Binary Tree
Oct 7, 2018...moreA
tree
is a frequently-used data structure to simulate a hierarchical tree structure.刷题总结 - Hash Table
Sep 27, 2018...moreHash Table
is a data structure which organizes data usinghash functions
in order to support quick insertion and search.刷题总结 - Linked List
Sep 17, 2018...moreIn this card, we are going to introduce another data structure -
Linked List
.Similar to the array, the linked list is also a
linear
data structure. Here is an example:刷题总结 - Queue & Stack
Sep 10, 2018...moreWe may access a random element by index in
Array
. However, we might want to restrict the processing order in some cases.刷题总结 - Array and String
Sep 10, 2018...moreArray
is one of the fundamental blocks in data structure. Since astring
is just formed by an array of characters, they are both similar. Most interview questions fall into this category.Priority Queues
Sep 6, 2018...morePRIORITY QUEUES
A priority queue, like a dictionary, contains entries that each consist of a key and an associated value. However, whereas a dictionary is used when we want to be able to look up arbitrary keys, a priority queue is used to prioritize entries. Define a total order on the keys (e.g. alphabetical order). You may identify or remove the entry whose key is the lowest (but no other entry). This limitation helps to make priority queues fast. However, an entry with any key may be inserted at any time.
Trees, BSTs
Sep 6, 2018...moreROOTED TREES
A tree consists of:
- a set of nodes.
- a set of edges that connect pairs of nodes.
A tree has the property that there is exactly one path (no more, no less) between any two nodes of the tree. A path is a sequence of one or more nodes, each consecutive pair being connected by an edge.
Disjoint Sets
Sep 5, 2018...moreThe Dynamic Connectivity Problem
Goal: Given a series of pairwise integers connectedness declarations, determine if two integers (or items) are connected. Two operations:
Stacks, Queues, & Deques
May 9, 2018...moreSTACKS
A stack is a crippled list. You may manipulate only the item at the top of the stack. The main operations: you may
push
a new item onto the top of the stack; you maypop
the top item off the stack; you may examine thetop
item of the stack. A stack can grow arbitrarily large.