Given a string s, return the length of the longest substring between two equal characters, excluding the two characters. If there is no such substring return -1. A substring …
Code submitted to Google Kickstart Online Judge is a complete solution that includes reading from stdin and output the answers for each test cases to stdout. There will be …
Recently, I have been experiencing the cable/wired connection drops momentarily every few hours and fails to get a new IP (the network adapter shows trying to identifying..) via DHCP …
A string is a valid parentheses string (denoted VPS) if it meets one of the following: It is an empty string “”, or a single character not equal to …
Given a non-empty array nums containing only positive integers, find if the array can be partitioned into two subsets such that the sum of elements in both subsets is …
A binary expression tree is a kind of binary tree used to represent arithmetic expressions. Each node of a binary expression tree has either zero or two children. Leaf …