# Hash Table

## Letter Combinations of a Phone LeetCode Solution | Easy Approach

Letter Combinations of a Phone | Given a string containing digits fromÂ 2-9Â inclusive, return all possible letter combinations that the number could represent. Return the answer inÂ any order. A mapping of digit to letters (just like on the telephone buttons) is given below. Note that 1 does not map to any letters. Example 1: Input: digits …

## Roman to Integer LeetCode Solution | Easy Approach

Roman to Integer | Roman numerals are represented by seven different symbols:Â I,Â V,Â X,Â L,Â C,Â DÂ andÂ M. Symbol Value I 1 V 5 X 10 L 50 C 100 D 500 M 1000 For example, 2 is written as II in Roman numeral, just two one’s added together. 12 is written as XII, which is simply X + II. The number 27 is written as XXVII, which is XX + V + …

## Integer to Roman Leetcode Solution | Easy Approach

Integer to Roman | Roman numerals are represented by seven different symbols: I, V, X, L, C, D and M. Symbol Value I 1 V 5 X 10 L 50 C 100 D 500 M 1000 For example, 2 is written as II in Roman numeral, just two one’s added together. 12 is written as XII, which is simply X + II. The number 27 is written as XXVII, which is XX + V + …

## Two Sum Leetcode Optimal Solution | C++ | Java | Python

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. You can return the answer in any order. Example 1: Input: nums = [2,7,11,15], target = 9 Output: [0,1] Explanation: Because …

## Longest Substring Without Repeating Characters Leetcode Solution

Longest Substring Without Repeating Characters | Given a stringÂ s, find the length of theÂ longest substringÂ without repeating characters. Example 1: Input: s = “abcabcbb” Output: 3 Explanation: The answer is “abc”, with the length of 3. Example 2: Input: s = “bbbbb” Output: 1 Explanation: The answer is “b”, with the length of 1. Example 3: …