Question Implement the following function, FindSortedArrayRotation, which takes as its input an array of unique integers that has been sorted in ascending order, then rotated by »

Question Write an efficient algorithm that searches for a value in an n x m table (two-dimensional array). This table is sorted along the rows and »

Question Given two strings, write a method to decide if one is a permutation of the other. Short Solution // Time complexity: O(nlogn) function isPermutation(a, »

Question Given a string, determine if it is a palindrome, considering only alphanumeric characters and ignoring cases. Origin from: LeetCode Solution // Time complexity: O(n) function »

Question Given a string of parentheses "{", "}", check if the string is valid parentheses. The brackets must close in the correct order. E.g.: "{{}}" is valid, "}{}{" is »

How to get the value from URL parameter? This is a very common tip in web development. Code is as follow: function getValue(key) { var query »

Transpose in JavaScript Transpose: interchange rows and columns of a matrix (two-dimensional array). [ [1, 2, 3], [4, 5, 6] ]; ↓↓↓ [ [1, 4], [2, 5] »

The job I am trying to solve is described blew: When I click on a DOM element like a button or a link, it triggers an »

Toggle as a basic feature in Front-end development, has been used for lots of modern websites. A lot of times, we need a toggle feature to »

The first time I saw Steve Souders was at HTML5 Conference 2013 in San Francisco. Just in case you haven't heard about him, here is a »