All Posts
Leetcode 1: Two Sum
Given an array of integers nums
and a target integer target
, find and return the indices of two distinct numbers in the array that sum up to the given target. The solution is guaranteed to exist for the given input. You can return the indices in any order.
Leetcode 9: Palindrome Number
Given an integer, return true if the number is a palindrome. A number is a palindrome if it reads the same forwards and backwards. If the number is negative, it is automatically not a palindrome.
Leetcode 13: Roman to Integer
Convert a given valid Roman numeral string into its integer equivalent by following the Roman numeral system.
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:
- Open brackets must be closed by the same type of brackets.
- Open brackets must be closed in the correct order.
- Every close bracket has a corresponding open bracket of the same type.