Category: data structure
Nested String A string S consisting of N characters is considered to be properly nested if any of the following conditions is true: S is empty; S has the …
Given an array of integers, the majority number is the number that occurs more than half of the size of the array. Find it in O(n) time and O(1) …
This is a real interview question: What is the difference between List and Dictionary in Python? You need to answer that immediately without googling.. My answer: a list is …
In this post, we present the final ‘optimized’ solution using Dynamic Programming, which is implemented using a 2 dimensional array with iteration. Let’s review this code: function f($x, $y) …
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. …