All Posts

Leetcode 205: Isomorphic Strings

Two strings s and t are isomorphic if you can replace the characters in s to get t. The replacement should be such that each character in s maps to exactly one character in t, and the mapping must preserve the order of characters. No two characters in s or t can map to the same character.

Leetcode 208: Implement Trie (Prefix Tree)

Implement a Trie data structure that supports inserting words, searching for exact matches, and checking if any word starts with a given prefix.

Leetcode 217: Contains Duplicate

Given an array of integers, determine if there are any duplicate values present. Return true if any value appears more than once, otherwise return false.

Leetcode 229: Majority Element II

Given an integer array, find all elements that appear more than ⌊n/3⌋ times, where n is the length of the array. Your task is to return a list of all such elements.

Leetcode 242: Valid Anagram

You are given two strings, s and t. Determine if t is an anagram of s. Two strings are considered anagrams if they contain the exact same characters, but possibly in a different order.

Leetcode 268: Missing Number

Given an array nums containing n distinct numbers, each in the range [0, n], return the only number in the range that is missing from the array.