ATLAS-B28 / Roadmap-DSA

DSA prep

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Roadmap-DSA -

All the core concepts regarding Data Structures and algorithms and Interview Questions are actively added from various sources in Java, C, C++, Typescript, and Go language. The main focus is on the JAVA.

Why Java?

Java is a write-once-run-anywhere language, it is a statically typed compiled language used in all the major systems and applications. Many companies all across the industry therefore require Java and that's why the DSA concepts in Java are very crucial. For basics of Java - https://github.com/ATLAS-B28/java-tut. For CtCI library and questions refer to the original - https://github.com/careercup/CtCI-6th-Edition/tree/master. It is used to learn and practice the questions in the book - CtCI. Also, it has the CtCI library which is not mine.

Currently, Doing -

  1. CtCI and LeetCode questions underway.
  2. DP will be implemented soon
  3. Also preparing using coding interview patterns - https://github.com/ATLAS-B28/interview_patterns .The original is -https://dvpr.gitbook.io/coding-interview-patterns/

Why Go?

GO language started as an internal language at GOOGLE for their server code and now is rapidly gaining ground in the industry. GO has very simple syntax but has a very C/C++-like execution speed and can do concurrency and garbage collection. Therefore, learning DSA concepts in GO is very helpful.

Why C/C++ ?

C/C++ languages have been used for a long time and will teach us to manage memory and concurrency. Also, it has the STL in-built which enables us to use various parts like containers. Useful to program complex and fast systems, here are often used in DSA.

Why Typescript?

Typescript is built upon Javascript and adds a type system to it. The Kata-Machine library is from ThePrimegean and not mine and will be used for his course on DSA.

Why Python?

Python language is versatile and has easy to understand syntax.

Why Scala?

Scala is JVM functional language.

Languages Used -

My Skills

Arrrays Questions-

Leetcode Basic Level:

Find the maximum element in an array. Technique: Iteration through the array.

Find the minimum element in an array. Technique: Iteration through the array.

Calculate the sum of all elements in an array. Technique: Iteration through the array.

Reverse an array. Technique: Two-pointer approach or iterative swapping.

Check if an array is sorted. Technique: Iteration through the array.

Remove duplicates from a sorted array. Technique: Two-pointer approach.

Rotate an array to the right by k steps. Technique: Basic array manipulation.

Implement an algorithm to find the "Kth" largest element in an array. Technique: Sorting or use of max heap.

Implement an algorithm to find the "Kth" smallest element in an array. Technique: Sorting or use of min heap.

Move all zeroes to the end of the array. Technique: Two-pointer approach. Intermediate Level:

Implement an algorithm to rotate an NxN matrix by 90 degrees. Technique: Transpose and reverse or use of extra space.

Implement an algorithm to find pairs in an array that sum up to a specific target. Technique: Two-pointer approach or hash table.

Implement an algorithm to perform a cyclic rotation in a given array. Technique: Cyclic Sort.

Find the "celebrity" in a party using a given array of people. Technique: Two-pointer approach.

Implement an algorithm to find the contiguous subarray with the largest sum (Kadane's algorithm). Technique: Dynamic Programming.

Implement an algorithm to merge two sorted arrays. Technique: Merge Sort or Two-pointer approach.

Implement an algorithm to search for an element in a rotated sorted array. Technique: Modified Binary Search.

Implement an algorithm to find the intersection of two arrays. Technique: Hashing or Two-pointer approach.

Implement an algorithm to find the majority element in an array. Technique: Boyer-Moore Voting Algorithm.

Implement an algorithm to find the longest increasing subsequence in an array. Technique: Dynamic Programming. Advanced Level:

Implement an algorithm to find the first missing positive integer in an unsorted array. Technique: Cyclic Sort.

Implement an algorithm to sort an array of 0s, 1s, and 2s (Dutch National Flag problem). Technique: Dutch National Flag algorithm or Two-pointer approach.

Implement an algorithm to find the longest subarray with at most two distinct elements. Technique: Sliding Window.

Implement an algorithm to find the median of two sorted arrays. Technique: Binary Search.

Implement an algorithm to rotate an array to the right by k steps without using extra space. Technique: Reverse the array in parts.

Implement an algorithm to find the shortest subarray with a sum at least K. Technique: Sliding Window.

Implement an algorithm to find the equilibrium index of an array. Technique: Prefix Sum.

Implement an algorithm to find the peak element in an array. Technique: Binary Search.

Implement an algorithm to count the number of subarrays with a given sum. Technique: Prefix Sum.

Implement an algorithm to find the contiguous subarray with equal numbers of 0s and 1s. Technique: Prefix Sum or Hashing. Expert Level:

Implement an algorithm to efficiently find the maximum product of three numbers in an array. Technique: Sorting or finding max/min elements.

Implement an algorithm to find the length of the longest subarray with sum divisible by k. Technique: Prefix Sum and Hashing.

Implement an algorithm to find the minimum window in an array that contains all elements of another array. Technique: Sliding Window.

Implement an algorithm to find the longest increasing subarray with absolute difference less than or equal to a given number. Technique: Sliding Window.

Implement an algorithm to find the smallest subarray with sum greater than a given value. Technique: Sliding Window.

Implement an algorithm to find the minimum number of platforms needed for a set of train arrivals and departures. Technique: Merge Intervals or Sorting.

Implement an algorithm to find the maximum length subarray with sum less than or equal to a given sum. Technique: Sliding Window.

Implement an algorithm to find the subarray with the least average. Technique: Sliding Window.

Implement an algorithm to efficiently rotate an NxN matrix by 90 degrees in place. Technique: Transpose and reverse.

Implement an algorithm to find the longest subarray with at most K distinct elements. Technique: Sliding Window or Hashing.

About

DSA prep


Languages

Language:Java 50.9%Language:C++ 19.1%Language:Go 12.6%Language:JavaScript 9.2%Language:Python 4.1%Language:Scala 2.1%Language:TypeScript 1.9%Language:C 0.1%Language:HTML 0.1%