All Posts

Leetcode 17: Letter Combinations of a Phone Number

Given a string of digits, return all possible letter combinations that the digits could represent based on the phone’s number-to-letter mapping.

Leetcode 20: Valid Parentheses

You are given a string containing characters representing various types of brackets: ‘(’, ‘)’, ‘{’, ‘}’, ‘[’ and ‘]’. Your task is to determine if the input string is valid. A string is considered valid if:

  1. Open brackets must be closed by the same type of brackets.
  2. Open brackets must be closed in the correct order.
  3. Every close bracket has a corresponding open bracket of the same type.

Leetcode 22: Generate Parentheses

Given a number ’n’, find all possible combinations of ’n’ pairs of parentheses that are balanced and well-formed.

Leetcode 38: Count and Say

The Count-and-Say sequence starts with ‘1’. Each subsequent term is generated by describing the previous term in terms of the count of consecutive digits. Given a positive integer n, return the nth term of the Count-and-Say sequence.

Leetcode 43: Multiply Strings

Given two non-negative integers represented as strings, return their product as a string. You must not use any built-in BigInteger library or convert the inputs to integers directly.

Leetcode 49: Group Anagrams

You are given an array of strings. Group the strings that are anagrams of each other together and return them as a list of lists. An anagram is a word or phrase formed by rearranging the letters of another word or phrase.