Unlock your potential as a programmer with 'Mastering Data Structures and Algorithms.' This concise yet comprehensive revision guide is packed with essential concepts, examples, and practice problems to help you ace your exams and interviews. Perfect for students and professionals alike, this guide...
Complete Data structures and UPDATED
Algorithms Guide
Resources, Notes, Videos, Solutions
2022
This document provides a complete guide to understanding data structures and
algorithms in computer science. It contains a collection of information compiled by
people who have successfully completed interviews at FAANG companies as well
as a useful information, tips, graphics, etc. to help better understand the subject
matter and be a better coder or to ace that interview.
This guide is provided to you with the mission of making the world’s resources
more accessible to all.
- Enjoy the process and start today. I’m sure you’ll do great. Have fun.
Arrays
Introduction
⭐ Informally, an array is a list of things. It doesn’t matter what the things are; they can be
numbers, words, apple trees, or other arrays. Each thing in an array is called an item or
element. Usually, arrays are enclosed in brackets with each item separated by commas, like
this: [1, 2, 3]. The elements of [1, 2, 3] are 1, 2, and 3.
- Introduction to Arrays
- https://www.cs.cmu.edu/~15122/handouts/03-arrays.pdf
- An Overview of Arrays and Memory (Data Structures & Algorithms #2)
- What is an Array? - Processing Tutorial
Arrays are used with all different types of data structures to solve different problems, so it’s kind
of hard to come up with array questions with just an array logic. Let’s discuss some of the most
famous patterns which concern arrays most of the time.
2D matrices are also arrays and are very commonly asked in interviews. A lot of graph, DP, and
search based questions involve the use of a 2D matrix and it’s important to understand the core
concepts there. We’ve discussed the common patterns in each section below so make sure to
check that out.
Hash maps, tables
⭐ A hash table is a data structure that implements an associative array abstract data type, a
structure that can map keys to values. In other words, we can store anything in the form of key
value pairs.
Example: map<string, string>, means that this is a hashmap where we store string key and
value pairs.
4
, BlockTrain.info
Resources
- Hashmap and Map Powerful Guide
- Data Structure and Algorithms - Hash Table
- Leetcode discuss: Hashtable implementation
Questions
- 1. Two Sum
- 771. Jewels and Stones
- Leetcode : How Many Numbers Are Smaller Than the Current Number
- Partition Labels
⭐ For questions where we’re trying to find a subset, set of elements, or something in a sorted
array -> 2 pointers approach is super useful.
5
The benefits of buying summaries with Stuvia:
Guaranteed quality through customer reviews
Stuvia customers have reviewed more than 700,000 summaries. This how you know that you are buying the best documents.
Quick and easy check-out
You can quickly pay through credit card for the summaries. There is no membership needed.
Focus on what matters
Your fellow students write the study notes themselves, which is why the documents are always reliable and up-to-date. This ensures you quickly get to the core!
Frequently asked questions
What do I get when I buy this document?
You get a PDF, available immediately after your purchase. The purchased document is accessible anytime, anywhere and indefinitely through your profile.
Satisfaction guarantee: how does it work?
Our satisfaction guarantee ensures that you always find a study document that suits you well. You fill out a form, and our customer service team takes care of the rest.
Who am I buying these notes from?
Stuvia is a marketplace, so you are not buying this document from us, but from seller kalashbhadoriya. Stuvia facilitates payment to the seller.
Will I be stuck with a subscription?
No, you only buy these notes for £6.88. You're not tied to anything after your purchase.