mirror of
https://github.com/yangshun/tech-interview-handbook.git
synced 2025-07-28 04:33:42 +08:00
seo: add social image
This commit is contained in:
@ -15,6 +15,10 @@ sidebar_label: Array
|
||||
toc_max_heading_level: 2
|
||||
---
|
||||
|
||||
<head>
|
||||
<meta property="og:image" content="https://www.techinterviewhandbook.org/social/algorithms/algorithms/algorithms-array.png" />
|
||||
</head>
|
||||
|
||||
## Introduction
|
||||
|
||||
Arrays hold values of the same type at contiguous memory locations. In an array, we're usually concerned about two things - the position/index of an element and the element itself. Different programming languages implement arrays under the hood differently and can affect the time complexity of operations you make to the array. In some languages like Python, JavaScript, Ruby, PHP, the array (or list in Python) size is dynamic and you do not need to have a size defined beforehand when creating the array. As a result, people usually have an easier time using these languages for interviews.
|
||||
|
@ -15,6 +15,10 @@ sidebar_label: Binary
|
||||
toc_max_heading_level: 2
|
||||
---
|
||||
|
||||
<head>
|
||||
<meta property="og:image" content="https://www.techinterviewhandbook.org/social/algorithms/algorithms/algorithms-binary.png" />
|
||||
</head>
|
||||
|
||||
## Introduction
|
||||
|
||||
Knowledge of binary number system and bit manipulation is less important in coding interviews as most Software Engineers do not have to deal with bits, which is more commonly used when dealing with lower level systems and programming languages. They are still asked sometimes, so you should at least still know how to convert a number from decimal form into binary form, and vice versa, in your chosen programming language.
|
||||
|
@ -15,6 +15,10 @@ sidebar_label: Dynamic programming
|
||||
toc_max_heading_level: 2
|
||||
---
|
||||
|
||||
<head>
|
||||
<meta property="og:image" content="https://www.techinterviewhandbook.org/social/algorithms/algorithms/algorithms-dynamic-programming.png" />
|
||||
</head>
|
||||
|
||||
## Introduction
|
||||
|
||||
Dynamic Programming (DP) is usually used to solve optimization problems. The only way to get better at DP is to practice. It takes some amount of practice to be able to recognize that a problem can be solved by DP.
|
||||
|
@ -15,6 +15,10 @@ sidebar_label: Geometry
|
||||
toc_max_heading_level: 2
|
||||
---
|
||||
|
||||
<head>
|
||||
<meta property="og:image" content="https://www.techinterviewhandbook.org/social/algorithms/algorithms/algorithms-geometry.png" />
|
||||
</head>
|
||||
|
||||
## Introduction
|
||||
|
||||
Geometry is a branch of mathematics that is concerned with properties of space that are related with distance, shape, size, and relative position of figures. Advanced geometry (e.g. 3D geometry) is not taught in most Computer Science courses, so you can expect that you will only be asked on 2D geometry.
|
||||
|
@ -15,6 +15,10 @@ sidebar_label: Graph
|
||||
toc_max_heading_level: 2
|
||||
---
|
||||
|
||||
<head>
|
||||
<meta property="og:image" content="https://www.techinterviewhandbook.org/social/algorithms/algorithms/algorithms-graph.png" />
|
||||
</head>
|
||||
|
||||
## Introduction
|
||||
|
||||
A graph is a structure containing a set of objects (nodes or vertices) where there can be edges between these nodes/vertices. Edges can be directed or undirected and can optionally have values (a weighted graph). Trees are undirected graphs in which any two vertices are connected by exactly one edge and there can be no cycles in the graph.
|
||||
|
@ -15,6 +15,10 @@ sidebar_label: Hash table
|
||||
toc_max_heading_level: 2
|
||||
---
|
||||
|
||||
<head>
|
||||
<meta property="og:image" content="https://www.techinterviewhandbook.org/social/algorithms/algorithms/algorithms-hash-table.png" />
|
||||
</head>
|
||||
|
||||
## Introduction
|
||||
|
||||
A hash table (commonly referred to as hash map) a data structure that implements an associative array abstract data type, a structure that can map keys to values. A hash table uses a hash function on an element to compute an index, also called a hash code, into an array of buckets or slots, from which the desired value can be found. During lookup, the key is hashed and the resulting hash indicates where the corresponding value is stored.
|
||||
|
@ -15,6 +15,10 @@ sidebar_label: Heap
|
||||
toc_max_heading_level: 2
|
||||
---
|
||||
|
||||
<head>
|
||||
<meta property="og:image" content="https://www.techinterviewhandbook.org/social/algorithms/algorithms/algorithms-heap.png" />
|
||||
</head>
|
||||
|
||||
## Introduction
|
||||
|
||||
A heap is a specialized tree-based data structure which is a complete tree that satisfies the heap property.
|
||||
|
@ -15,6 +15,10 @@ sidebar_label: Interval
|
||||
toc_max_heading_level: 2
|
||||
---
|
||||
|
||||
<head>
|
||||
<meta property="og:image" content="https://www.techinterviewhandbook.org/social/algorithms/algorithms/algorithms-interval.png" />
|
||||
</head>
|
||||
|
||||
## Introduction
|
||||
|
||||
Interval questions are a subset of [array](./array.md) questions where you are given an array of two-element arrays (an interval) and the two values represent a start and an end value. Interval questions are considered part of the array family but they involve some common techniques hence they are extracted out to this special section of their own.
|
||||
|
@ -15,6 +15,10 @@ sidebar_label: Linked list
|
||||
toc_max_heading_level: 2
|
||||
---
|
||||
|
||||
<head>
|
||||
<meta property="og:image" content="https://www.techinterviewhandbook.org/social/algorithms/algorithms/algorithms-linked-list.png" />
|
||||
</head>
|
||||
|
||||
## Introduction
|
||||
|
||||
Like arrays, a linked list is used to represent sequential data. It is a linear collection of data elements whose order is not given by their physical placement in memory, as opposed to arrays, where data is stored in sequential blocks of memory. Instead, each element contains an address of the next element. It is a data structure consisting of a collection of nodes which together represent a sequence.
|
||||
|
@ -15,6 +15,10 @@ sidebar_label: Math
|
||||
toc_max_heading_level: 2
|
||||
---
|
||||
|
||||
<head>
|
||||
<meta property="og:image" content="https://www.techinterviewhandbook.org/social/algorithms/algorithms/algorithms-math.png" />
|
||||
</head>
|
||||
|
||||
## Introduction
|
||||
|
||||
Math is a foundational aspect of Computer Science and every programmer and computer scientist needs to have basic mathematical knowledge. Thankfully, for the purpose of coding interviews, there usually won't be that much math involved, but some basic math techniques is helpful to know as you may be asked to implement mathematical operations.
|
||||
|
@ -15,6 +15,10 @@ sidebar_label: Matrix
|
||||
toc_max_heading_level: 2
|
||||
---
|
||||
|
||||
<head>
|
||||
<meta property="og:image" content="https://www.techinterviewhandbook.org/social/algorithms/algorithms/algorithms-matrix.png" />
|
||||
</head>
|
||||
|
||||
## Introduction
|
||||
|
||||
A matrix is a 2-dimensional array. Questions involving matrices are usually related to [dynamic programming](./dynamic-programming.md) or [graph](./graph.md) traversal.
|
||||
|
@ -15,6 +15,10 @@ sidebar_label: Queue
|
||||
toc_max_heading_level: 2
|
||||
---
|
||||
|
||||
<head>
|
||||
<meta property="og:image" content="https://www.techinterviewhandbook.org/social/algorithms/algorithms/algorithms-queue.png" />
|
||||
</head>
|
||||
|
||||
## Introduction
|
||||
|
||||
A queue is a linear collection of elements that are maintained in a sequence and can be modified by the addition of elements at one end of the sequence (**enqueue** operation) and the removal of elements from the other end (**dequeue** operation). Usually, the end of the sequence at which elements are added is called the back, tail, or rear of the queue, and the end at which elements are removed is called the head or front of the queue. As an abstract data type, queues can be implemented using arrays or singly linked lists.
|
||||
|
@ -15,6 +15,10 @@ sidebar_label: Recursion
|
||||
toc_max_heading_level: 2
|
||||
---
|
||||
|
||||
<head>
|
||||
<meta property="og:image" content="https://www.techinterviewhandbook.org/social/algorithms/algorithms/algorithms-recursion.png" />
|
||||
</head>
|
||||
|
||||
## Introduction
|
||||
|
||||
Recursion is a method of solving a computational problem where the solution depends on solutions to smaller instances of the same problem.
|
||||
|
@ -15,6 +15,10 @@ sidebar_label: Sorting and searching
|
||||
toc_max_heading_level: 2
|
||||
---
|
||||
|
||||
<head>
|
||||
<meta property="og:image" content="https://www.techinterviewhandbook.org/social/algorithms/algorithms/algorithms-sorting-searching.png" />
|
||||
</head>
|
||||
|
||||
## Introduction
|
||||
|
||||
Sorting is the act of rearranging elements in a sequence in order, either in numerical or lexicographical order, and either ascending or descending.
|
||||
|
@ -15,6 +15,10 @@ sidebar_label: Stack
|
||||
toc_max_heading_level: 2
|
||||
---
|
||||
|
||||
<head>
|
||||
<meta property="og:image" content="https://www.techinterviewhandbook.org/social/algorithms/algorithms/algorithms-stack.png" />
|
||||
</head>
|
||||
|
||||
## Introduction
|
||||
|
||||
A a stack is an abstract data type that supports the operations **push** (insert a new element on the top of the stack) and **pop** (remove and return the most recently added element, the element at the top of the stack). As an abstract data type, stacks can be implemented using arrays or singly linked lists.
|
||||
|
@ -15,6 +15,10 @@ sidebar_label: String
|
||||
toc_max_heading_level: 2
|
||||
---
|
||||
|
||||
<head>
|
||||
<meta property="og:image" content="https://www.techinterviewhandbook.org/social/algorithms/algorithms/algorithms-string.png" />
|
||||
</head>
|
||||
|
||||
## Introduction
|
||||
|
||||
A string is a sequence of characters. Many tips that apply to arrays also apply to strings. You're recommended to read the page on [Arrays](./array.md) before reading this page.
|
||||
|
@ -6,6 +6,10 @@ keywords: [coding interview algorithms, coding interview data structures]
|
||||
sidebar_label: Introduction
|
||||
---
|
||||
|
||||
<head>
|
||||
<meta property="og:image" content="https://www.techinterviewhandbook.org/social/algorithms/algorithms-study-cheatsheet.png" />
|
||||
</head>
|
||||
|
||||
import InDocAd from '../\_components/InDocAd';
|
||||
|
||||
## What is this
|
||||
|
@ -15,6 +15,10 @@ sidebar_label: Tree
|
||||
toc_max_heading_level: 2
|
||||
---
|
||||
|
||||
<head>
|
||||
<meta property="og:image" content="https://www.techinterviewhandbook.org/social/algorithms/algorithms/algorithms-tree.png" />
|
||||
</head>
|
||||
|
||||
## Introduction
|
||||
|
||||
A tree is a widely used abstract data type that represents a hierarchical structure with a set of connected nodes. Each node in the tree can be connected to many children, but must be connected to exactly one parent, except for the root node, which has no parent.
|
||||
|
@ -15,6 +15,10 @@ sidebar_label: Trie
|
||||
toc_max_heading_level: 2
|
||||
---
|
||||
|
||||
<head>
|
||||
<meta property="og:image" content="https://www.techinterviewhandbook.org/social/algorithms/algorithms/algorithms-trie.png" />
|
||||
</head>
|
||||
|
||||
## Introduction
|
||||
|
||||
Tries are special trees (prefix trees) that make searching and storing strings more efficient. Tries have many practical applications, such as conducting searches and providing autocomplete. It is helpful to know these common applications so that you can easily identify when a problem can be efficiently solved using a trie.
|
||||
|
Reference in New Issue
Block a user