Tag: algorithms
Given N natural integers (from 1 to N), the number of all permutations is N! (Factorial). That is explained by the fact: There are N choices when selecting the …
There are two sorted integer arrays nums1 and nums2, merge nums2 into nums1 as one sorted array. nums1 has enough space to hold additional elements from nums2. The number …
This is the technical phone interview question from Google. Google has offices in London but the call was from Google Switzerland (+41). The interview lasts for 45 minutes. Given …
Given a string s and a dictionary of words dict, determine if s can be segmented into a space-separated sequence of one or more dictionary words. For example, given …
Given an array of numbers nums, in which exactly two elements appear only once and all the other elements appear exactly twice. Find the two elements that appear only …