Courses/Data Structures/Arrays & Hashing

Arrays & Hashing

Easy12 problems

📹 Video Explanation

Learn the fundamental concepts of array manipulation and hash table techniques with clear examples and code implementations.

📚 Core Concepts

RAM (Random Access Memory)

Understanding how computer memory works and why arrays are fast

8:30
Watch

Static Arrays

Fixed-size arrays with O(1) access time

12:15
Watch

Dynamic Arrays

Resizable arrays (ArrayList, Vector) and amortized analysis

15:45
Watch

Hash Tables

Key-value pairs with O(1) average operations

18:20
Watch

Hash Functions

How hashing works and collision handling

14:10
Watch

💻 Common Patterns

Two Sum Pattern

def two_sum(nums, target):
    hash_map = {}  # value -> index
    for i, num in enumerate(nums):
        complement = target - num
        if complement in hash_map:
            return [hash_map[complement], i]
        hash_map[num] = i
    return []

Frequency Counter

def count_frequency(arr):
    freq = {}
    for item in arr:
        freq[item] = freq.get(item, 0) + 1
    return freq

🎯 Practice Problems

Two SumEasy
Solve →
Contains DuplicateEasy
Solve →
Valid AnagramEasy
Solve →
Group AnagramsMedium
Solve →