This directory contains Python implementations of common array-based algorithms and problems.
-
Anagram Check (Sorted Solution): Checks if two strings are anagrams by comparing their sorted versions. Complexity:
$O(n \log n)$ . -
Anagram Check (Manual Solution): Checks if two strings are anagrams using a hash table (dictionary) to count character frequencies. Complexity:
$O(n)$ . -
Array Find Missing Element (XOR Solution): Efficiently finds a missing element in a shuffled array using bitwise XOR. Complexity:
$O(n)$ time,$O(1)$ space. -
Array Find Missing Element (Brute Force Solution): Finds a missing element by sorting both arrays and comparing them. Complexity:
$O(n \log n)$ . -
Array Find Missing Element (Hash Table Solution): Finds a missing element using a hash table (dictionary) to track element counts. Complexity:
$O(n)$ . -
Array Find Missing Element (Sum/Subtract Solution): Finds a missing element by calculating the difference between the sums of the two arrays. Complexity:
$O(n)$ . -
Array Pair Sum Solution: Finds all unique pairs in an array that sum up to a specific value
$k$ using a set. Complexity:$O(n)$ .