Author: ACMer
Given a binary search tree, return a balanced binary search tree with the same node values. A binary search tree is balanced if and only if the depth of …
Given a m * n matrix of distinct numbers, return all lucky numbers in the matrix in any order. A lucky number is an element of the matrix such …
In OOP (Object Oriented Programming), we use inheritance to achieve the polymorphism. The factory design pattern allows you to create/manage different types of classes in a single place. Let’s …
Given a string s of ‘(‘ , ‘)’ and lowercase English characters. Your task is to remove the minimum number of parentheses ( ‘(‘ or ‘)’, in any positions …
Given two sequences pushed and popped with distinct values, return true if and only if this could have been the result of a sequence of push and pop operations …