CodingNodes / Arrays & Hashing System design

Arrays & Hashing

31 animated solutions

The foundation: scanning arrays and using hash maps and sets to trade memory for speed. These patterns answer most 'have I seen this before?' questions in O(1) per lookup. Every problem below plays as an animated walkthrough with solutions in Python, Java and C++. Companies that ask these most: Yelp, Wissen Technology, Yahoo.

Contains Duplicate
EasyNeetCode 150 ▶ Watch
Contains Duplicate II
EasyTop Interview 150 ▶ Watch
Find the Index of the First Occurrence in a String
EasyTop Interview 150 ▶ Watch
Isomorphic Strings
EasyTop Interview 150 ▶ Watch
Length of Last Word
EasyTop Interview 150 ▶ Watch
Longest Common Prefix
EasyTop Interview 150 ▶ Watch
Majority Element
EasyTop Interview 150 ▶ Watch
Merge Sorted Array
EasyTop Interview 150 ▶ Watch
Ransom Note
EasyTop Interview 150 ▶ Watch
Remove Duplicates from Sorted Array
EasyTop Interview 150 ▶ Watch
Remove Element
EasyTop Interview 150 ▶ Watch
Roman to Integer
EasyTop Interview 150 ▶ Watch
Two Sum
EasyNeetCode 150Top Interview 150 ▶ Watch
Valid Anagram
EasyNeetCode 150Top Interview 150 ▶ Watch
Word Pattern
EasyTop Interview 150 ▶ Watch
Best Time to Buy and Sell Stock II
MediumTop Interview 150 ▶ Watch
Encode and Decode Strings
MediumNeetCode 150 ▶ Watch
Group Anagrams
MediumNeetCode 150Top Interview 150 ▶ Watch
H-Index
MediumTop Interview 150 ▶ Watch
Insert Delete GetRandom O(1)
MediumTop Interview 150 ▶ Watch
Integer to Roman
MediumTop Interview 150 ▶ Watch
Longest Consecutive Sequence
MediumNeetCode 150Top Interview 150 ▶ Watch
Product of Array Except Self
MediumNeetCode 150Top Interview 150 ▶ Watch
Remove Duplicates from Sorted Array II
MediumTop Interview 150 ▶ Watch
Reverse Words in a String
MediumTop Interview 150 ▶ Watch
Rotate Array
MediumTop Interview 150 ▶ Watch
Top K Frequent Elements
MediumNeetCode 150 ▶ Watch
Valid Sudoku
MediumNeetCode 150Top Interview 150 ▶ Watch
Zigzag Conversion
MediumTop Interview 150 ▶ Watch
Candy
HardTop Interview 150 ▶ Watch
Text Justification
HardTop Interview 150 ▶ Watch