mirror of
https://github.com/krahets/hello-algo.git
synced 2024-12-26 02:36:28 +08:00
43bb45bceb
* Update pythontutor block with the latest code * Move docs-en to en/docs * Move mkdocs.yml and README to en folder * Fix en/mkdocs.yml * Update the landing page * Fix the glossary * Reduce the font size of the code block tabs * Add Kotlin blocks to en/docs * Fix the code link in en/.../deque.md * Fix the EN README link
1.3 KiB
1.3 KiB
Summary
- Algorithms are ubiquitous in daily life and are not as inaccessible and complex as they might seem. In fact, we have already unconsciously learned many algorithms to solve various problems in life.
- The principle of looking up a word in a dictionary is consistent with the binary search algorithm. The binary search algorithm embodies the important algorithmic concept of divide and conquer.
- The process of organizing playing cards is very similar to the insertion sort algorithm. The insertion sort algorithm is suitable for sorting small datasets.
- The steps of making change in currency essentially follow the greedy algorithm, where each step involves making the best possible choice at the moment.
- An algorithm is a set of instructions or steps used to solve a specific problem within a finite amount of time, while a data structure is the way data is organized and stored in a computer.
- Data structures and algorithms are closely linked. Data structures are the foundation of algorithms, and algorithms are the stage to utilize the functions of data structures.
- We can liken data structures and algorithms to building blocks. The blocks represent data, the shape and connection method of the blocks represent data structures, and the steps of assembling the blocks correspond to algorithms.