Using Javascript & Ava test runnerπ₯
- Algorithm: method for solving a problem.
- Data structure: method to store information
ALGORITHMS + DATA STRUCTURES = PROGRAMS.
π Their impact is broad and far-reaching
- Internet. Web search, packet routing, distributed file sharing, ...
- Biology. Human genome project, protein folding, ...
- Computers. Circuit layout, file system, compilers, ...
- Computer graphics. Movies, video games, virtual reality, ...
- Security. Cell phones, e-commerce, voting machines, ...
- Multimedia. MP3, JPG, DivX, HDTV, face recognition, ...
- Social networks. Recommendations, news feeds, advertisements, ...
- Physics. N-body simulation, particle collision simulation, ...
π To solve problems that could not otherwise be addressed
π To become a proficient programmer
β I will, in fact, claim that the difference between a bad programmer
and a good one is whether he considers his code or his data structures
more important. Bad programmers worry about the code. Good
programmers worry about data structures and their relationships. β
β **Linus Torvalds** (creator of Linux)
π For intellectual stimulation
π They may unlock the secrets of life and of the universe
Here's a list of the absolute, must-have knowledge
Source: Cracking the Coding Interview 6ed
For each of these topics, make sure you understand how to use and implement them and, where applicable, the space and time complexity.
Practicing implementing the data structures and algorithm (on paper, and then on a computer) is also a great exercise. It will help you learn how the internals of the data structures work, which is important for many interviews.
If you don't feel very, very comfortable with each of the data structures and algorithms listed, practice implementing them from scratch.
In particular, hash tables are an extremely important topic. Make sure you are very comfortable with this data structure.
- Run
npm i
to install. - Run
npm test
to run all tests. - Run
npm run test-recursion
to run all tests inrecursion folder
. - Run
npm run test-search
to run all tests insearching folder
. - Run
npm run test-sort
to run all tests insorting folder
. - Run
npm run test-data-structures
to run all tests indata-structures folder
.