Data Structures And Algorithms
By Sudheer S
Data Structures And Algorithms
- Data Structures: A data structure is a technique of storing data in a computer so that it can be accessed and modified efficiently.
- Algorithms: An algorithm is a step-by-step instruction to perform a task.
Why Should I Learn Data Structures And Algorithms?
- Enhance your problem solving skills.
- Write efficient code that is performant and scalable.
- Specialized fields: machine learning, data science, artificial intelligence and other engineering fields deal with complex data and require efficient processing. To delve into such fascinating fields of engineering, having a firm grounding in data structures and algorithms is beneficial and in many cases required.
Can I Develop Applications Without Studying Data Structures And Algorithms?
Yes, sure. A lot of applications just store some data in a datastore, typically a relational database and have some procedures to show this data in a user interface, most commonly the web browser. The crux of such applications can be defined using the acronym CRUD. CRUD stands for Create, Read, Update and Delete. Often you are doing one of these CRUD functions in the context of persistent storage of your application:
- You create some data. Creating amounts to an INSERT SQL query.
- You read some data. This equates to the SELECT SQL query.
- You update some data. This amounts to the UPDATE SQL query.
- Finally, you delete some data which equates to the DELETE SQL query.
Without formally studying data structures and algorithms, you can definitely develop such CRUD applications.
Then, Why Should I Care About Data Structures And Algorithms?
If your application becomes a huge success and needs scaling and performance, you will start looking to improve the efficiency in various parts of your application. Having a thorough understanding of data structures and algorithms will equip you to deal with such problems.
Is Mathematics Background Required To Learn Data Structures And Algorithms?
Yes. Most introductory data structures and algorithms just require an understanding of high school level mathematics.
To refresh your mathematics use a graphing calculator and plot and compare values of n2, n3,
2n, n!
, log n
and n log n
. Geogebra is an excellent
online graphing calculator. To learn logarithms use Khan Academy.
As you delve further into the study of data structures and algorithms, you’ll encounter increasingly complex mathematical concepts. A solid understanding of mathematics is crucial for grasping the fundamentals and advanced aspects of these subjects. Therefore, complementing your study of data structures and algorithms with a robust mathematical education is not only beneficial but often necessary for a comprehensive understanding. Take a look at the archives of Project Euler to get a sense of the types of problems we are talking about.
What Resources Are Out There To Learn Data Structures And Algorithms?
Our internet friends: Wikipedia, Youtube, open courses from universities, educational platforms(Coursera, Udemy, etc.), blogs, articles, ChatGPT, Bard, etc.
Do You Recommend Any Books To Learn Data Structures And Algorithms?
If you are just starting out, you won’t need a book. Besides, reading an algorithms book from cover to cover takes a lot of effort. If you are motivated enough and can dedicate the time, sure, go for the book. Using the free resources from the internet, you learn and practice for a few weeks or months. Consider buying a book only after this initial study duration. If you really want to hear a name, Introduction To Algorithms by Thomas H. Cormen, et al. is a good reference and introductory book on data structures and algorithms. A discussion of algorithms and books is incomplete without mentioning Knuth. The Art of Computer Programming is a series of books written by Donald Knuth. If you are in for lifelong learning of algorithms, consider buying and reading the volumes one by one.
Do I Have To Learn X Programming Language To Learn Data Structures And Algorithms?
The short answer: no. In the initial stages, stick to your favorite programming language.
The long answer: it depends. To learn elementary data structures and algorithms such as arrays, queues, stacks, graphs, trees, searching, sorting, etc. you can use any programming language of your choice. At some point you will need different languages depending on the algorithm you are studying. For example, to learn multithreaded and concurrent algorithms, you’re better off using a programming language that supports this paradigm and helps you squeeze more juice out of your CPU.
Companies Ask Questions About Data Structures And Algorithms In Interviews. How Can I Ace Them?
At ths time, I do not have recommendations or suggestions to ace DSA interviews. However, I can tell you that if you put in serious effort in learning data structures and algorithms, you are already in a good position to perform well in job interviews.
Can You Suggest A Path To Learn Data Structures?
Sure. Assuming, you are familiar with a programming language, here’s a thirty days plan.
Day | Topic |
---|---|
1 | Introduction |
2 | Complexity Analysis |
3 | Arrays |
4 | Strings |
5 | Linked Lists |
6 | Stacks |
7 | Queues |
8 | Tree - Basics |
9 | Binary Search Trees |
10 | Heaps |
11 | Hashing |
12 | Graphs - Basics |
13 | Basic Sorting Algorithms |
14 | Intermediate Sorting Algorithms |
15 | Advanced Trees. AVL Trees, Red Black Trees |
16 | Graph Algorithms Part I: Kruskal’s, Prim’s Algorithms |
17 | Dynamic Programming - Basics |
18 | Dynamic Programming - Advanced |
19 | Greedy Algorithms |
20 | Backtracking |
21 | Trie |
22 | Segment Tree |
23 | Network Flow |
24 | Advanced Graph Algorithms: Topological Sorting, Strongly Connected Components |
25 | Divide And Conquer Algorithms |
26 | Randomized Algorithms |
27 | Computational Geometry |
28 | Parallel And Distributed Systems |
29 | Advanced Data Structures |
30 | Review And Practice Problems |
Begin each day by reading the Wikipedia article related to the day’s topic. Follow this up by searching for and watching relevant videos on YouTube to deepen your understanding. Then, apply what you’ve learned by writing code. Repeat this process daily. With consistent effort and dedication over the course of thirty days, you will achieve significant progress in computer science, enhancing your programming abilities and problem-solving skills.
Resources
- Data Structure Visualizations by Associate Professor, David Galles from University Of San Fransisco.
- Algorithm Visualization - by Associate Professor Steven Halim.
- Project Euler is a series of challenging mathematical and computer programming problems.
- List Of Data Structures by Wikipedia.
- List Of Algorithms by Wikipedia.
- MIT 6.006 Introduction to Algorithms, Spring 2020
-
Playlist on Youtube. - Freecodecamp Resources
on data structures and algorithms.