# Hash Table

## Two Sum LeetCode Solution

Given an array of integers nums and an integer target, return indices of the two numbers such that they add up to target. You may assume that each input would have exactly one solution, and you may not use the same element twice.

## Longest Substring Without Repeating Characters LeetCode Solution

Given a string s, find the length of the longest substring without repeating characters.

## Contains Duplicate LeetCode Solution

Given an integer array nums, return true if any value appears at least twice in the array, and return false if every element is distinct.

## Contains Duplicate II LeetCode Solution

Given an integer array nums and an integer k, return true if there are two distinct indices i and j in the array such that nums[i] == nums[j] and abs(i – j) <= k.

## Happy Number LeetCode Solution

Write an algorithm to determine if a number n is happy. Return true if n is a happy number, and false if not.

## Single Number LeetCode Solution

Given a non-empty array of integers nums, every element appears twice except for one. Find that single one.

## Substring with Concatenation of All Words LeetCode Solution

You are given a string s and an array of strings words. All the strings of words are of the same length. Return the starting indices of all the concatenated substrings in s. You can return the answer in any order.

## Sudoku Solver LeetCode Solution

Write a program to solve a Sudoku puzzle by filling the empty cells.

## First Missing Positive LeetCode Solution

Given an unsorted integer array nums, return the smallest missing positive integer.

## Group Anagrams LeetCode Solution

Given an array of strings strs, group the anagrams together. You can return the answer in any order.

Scroll to Top