Filter by the role you are applying for, open a question, and practise explaining the answer out loud. Mark it practised when you can.
Why they ask this: A fundamental algorithm; off-by-one errors in the loop are exactly what interviewers look for.
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…
Why they ask this: The standard stack problem; it shows you can pick the right data structure for matching pairs.
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…