I have encountered this few times in the past. If you search on the Internet, you may see some approaches that deal with this requirement by custom mi…
My memo and playground
I have encountered this few times in the past. If you search on the Internet, you may see some approaches that deal with this requirement by custom mi…
Given an array of unique integers preorder, return true if it is the correct preorder traversal sequence of a binary search t…
There are n people in a line queuing to buy tickets, where the 0th person is at the front of the line and the (n – …
The school cafeteria offers circular and square sandwiches at lunch break, referred to by numbers 0 and 1 respectively. All studen…
Given an m x n 2D binary grid grid which represents a map of ‘1’s (land) and ‘0’s (water), return the number of isl…
Given a string s containing only three types of characters: ‘(‘, ‘)’ and ‘*’, return true if s is&nb…
Given a string s of ‘(‘ , ‘)’ and lowercase English characters. Your task is to remove the minimum number of parentheses…
Given a string s, return the length of the longest substring that contains at most two distinct characters. Example 1: Input…
Given a string s of lower and upper case English letters. A good string is a string which doesn’t have two adjacent characters&nb…
A string is a valid parentheses string (denoted VPS) if and only if it consists of “(” and “)” characters only, and: We …