In a given grid, each cell can have one of three values: the value 0 representing an empty cell; the value 1 representing a fresh orange; the value 2 …
Congratulations! You have passed the CV screening and the telephone coding assessment of Facebook. Facebook interviews are hard, like other Giants: Google, Amazon, or Microsoft. In Facebook, every engineer …
Let’s say, we have an array in Javascript, and we want to group the elements, ount their occurences and store the final results in a key-value dictionary. Input Array: …
Given a balanced parentheses string S, compute the score of the string based on the following rule: () has score 1 AB has score A + B, where A …
Given an array A of integers and integer K, return the maximum S such that there exists i < j with A + A = S and S < …
Given a non-empty string s, you may delete at most one character. Judge whether you can make it a palindrome. Example 1: Input: “aba” Output: True Example 2: Input: …