1 like 0 dislike
5,029 views
in RoadMaps-Tutorials by Expert (38,790 points)
edited by | 5,029 views

1 Answer

1 like 0 dislike

Author of this sheet : https://www.linkedin.com/in/kumark1/

Complete DSA Roadmap :- https://www.desiqna.in/4963/roadmap-for-dsa-data-structures-algorithms-kumar-desi-2022 

Desi QnA Hashing Sheet (Make sure to go through set A and set B to have a good preparation level for an interview)

------------------------------------------------------------------------------------------------------------------

You must be using languages like C++/Java/Python in your DSA Prep.

Desi QnA Tutorials for Hashing https://www.desiqna.in/tag/hashing_tutorials

1)First things first , understand the concept of map in your respective programming language - 

i)C++ : https://www.w3schools.blog/cpp-map

ii)Python : https://www.w3schools.com/python/python_dictionaries.asp

    (It is called as dictionary in python)

iii)Java : https://www.w3schools.com/java/java_hashmap.asp

   2) Understand the concept of hashing from here : i) 

ii) Best video on the concept of Hashing : https://www.youtube.com/watch?v=mFY0J5W8Udk

 iii) Good post to read : https://leetcode.com/discuss/general-discussion/1068545/HASH-TABLE-and-MAP-POWERFUL-GUIDE-

3)Now it is the time for problem solving . It is divided in three levels : A , B , C . First complete A , then B , then C . 

Set A :

P0 : https://www.geeksforgeeks.org/counting-frequencies-of-array-elements/?ref=lbp

(Most Fundamental and Most Important)

P1 : https://www.geeksforgeeks.org/given-an-array-a-and-a-number-x-check-for-pair-in-a-with-sum-as-x/

 Solution : https://www.youtube.com/watch?v=dRUpbt8vHpo&list=PLgUwDviBIf0rVwua0kKYlsS_ik_1lyVK_

 

P2 : https://www.geeksforgeeks.org/find-whether-an-array-is-subset-of-another-array-set-1/

 (Focus more on Hashng based solutions mentioned . Set and Map are mainly ued for Hashing.) 

P3 : https://www.geeksforgeeks.org/maximum-distance-two-occurrences-element-array/

 (Very Important)

P4 : https://www.geeksforgeeks.org/minimum-operation-make-elements-equal-array/?ref=lbp

P5 : https://www.geeksforgeeks.org/count-maximum-points-on-same-line/?ref=lbp

 P6 : https://www.geeksforgeeks.org/check-given-array-contains-duplicate-elements-within-k-distance/?ref=lbp

(Very Important)

P7 : https://www.geeksforgeeks.org/sum-of-elements-in-an-array-with-frequencies-greater-than-or-equal-to-that-element/?ref=rp

P8 : https://leetcode.com/problems/first-unique-character-in-a-string/

P9 : https://leetcode.com/problems/find-common-characters/

P10 : https://www.geeksforgeeks.org/count-pairs-with-given-sum/

Set B : 

P1 : https://www-geeksforgeeks-org.cdn.ampproject.org/v/s/www.geeksforgeeks.org/number-subarrays-sum-exactly-equal-k/amp/?amp_js_v=a6&amp_gsa=1&usqp=mq331AQKKAFQArABIIACAw%3D%3D#aoh=16470976960317&referrer=https%3A%2F%2Fwww.google.com&amp_tf=From%20%251%24s&ampshare=https%3A%2F%2Fwww.geeksforgeeks.org%2Fnumber-subarrays-sum-exactly-equal-k%2F

 

P2 : (Minimal length subarray of sum K)

 

https://stackoverflow.com/questions/64418218/smallest-subarray-with-sum-equal-to-k

Try to think of a hashing solution for this problem , assume that numbers in the array can be negative integers as well..

 

P3 : https://www.youtube.com/watch?v=lO9R5CaGRPY

P4 : https://leetcode.com/problems/continuous-subarray-sum/

 

P5 : https://leetcode.com/problems/subarray-sums-divisible-by-k/

 

P6 : https://www.geeksforgeeks.org/count-subarrays-with-sum-equal-to-its-xor-value/

 

P7 : https://leetcode.com/problems/max-number-of-k-sum-pairs/

 

P8 : https://leetcode.com/problems/count-number-of-pairs-with-absolute-difference-k/

 

P9:https://leetcode.com/problems/number-of-pairs-of-strings-with-concatenation-equal-to-target/

 

P10 : https://www.geeksforgeeks.org/find-a-triplet-that-sum-to-a-given-value/

 

P11 : https://www.geeksforgeeks.org/count-quadruplets-with-sum-k-from-given-array/

If you have solved set A && set B , you are now pretty much prepared from an interview point of view , you can try set C to raise the bar :) :) 

Set C : Coming Soon!

A nice PDF containing most important problems for Hashing : https://drive.google.com/file/d/1SVAHLw6pGg1wfcxflP8P-YmuT9FC-uWM/view?usp=sharing

 

by Expert (38,790 points)
edited by