Try each problem on paper first. Stuck? Reveal one hint at a time, read the approach, then compare your code with the JS and PHP solutions.
Given a sorted (ascending) array of distinct integers nums and a target, return the index of target, or -1 if it is not present. Your solution must run in O(log…
Given a string s containing only the characters (, ), {, }, [ and ], return true if: every opening bracket is closed by the same type of bracket, and brackets…