Given a list of integers nums, return the minimum cost of sorting the list in ascending or descending order. The cost is defined as the sum of differences between …
Given a Monotone Increasing Function f(x) and if y=f(x) is known, find the value of x. Find the x by Binary Search Algorithm Because function f(x) is monotone increasing …
Given a binary tree root, return the largest absolute difference between any node and its descendants. For example, given the following tree: 0 / \ 4 2 / \ …
Given a list of integers nums, sort the list in the following way: First number is the maximum Second number is the minimum Third number is the 2nd maximum …
You are given two strings s and t which both have length n. You can pick one character in s and another in t and swap them. Given you …
Guess what, the Big 5 (Top Internet / Software Companies) have similar recruiting process for SDE/SWE/SRE/SE positions (Software Engineer, Software Development Engineer, Site Reliable Engineering). On the final interviews …