Tag: algorithms
Given an array of integers, 1 ≤ a ≤ n (n = size of array), some elements appear twice and others appear once. Find all the elements that appear …
Given n non-negative integers a1, a2, …, an , where each represents a point at coordinate (i, ai). n vertical lines are drawn such that the two endpoints of …
The Hamming Distance is the number of different symbols between two strings/numbers (equal length). It can be also considered as the number of changes required to convert from one …
Given n items with size A (i from 0 to n – 1), an integer m denotes the size of a backpack. How full you can fill this backpack? …
I am recently reviewing the data structure & algorithms. And the hash table is one of the key knowledge that you can’t miss before you attend a coding interview. …