find Interview Practice Basic - Snapsack Problem Snapsack problem refers to the situation you want to find a combination of items that can fill up a container. Each items should be attached with a value, and there should be a

binary Interview Practice 28 - Counting One in Binary Expression Question Given a number, find the number of 1 in the number’s binary expression. For example, binary express of 10 is 1010. So the number of 1 in it is 2. Solution

cha Interview Practice 25 - Longest Consecutive Digits Question Given a function prototype: int continumax(char *output_string,char *input_string). Implement it to find the longest consecutive digits. This function must return the length of the longest digits. The found

app Interview Practice 21 - Summing Combinations Question Given a integers m and n, generate all combination within 1 to n that would give the sum m. For example, for m=5 and n=5, the combinations are {5}, {4+

determine Interview Pizzle 1 - Find the Heavier Marble Question You have 9 marbles. 8 marbles weigh 1 ounce each, & one marble weighs 1.5 ounces. You are unable to determine which is the heavier marble by looking at them. You

circle Interview Practice 18 - Last Surviving Number in Loop Consider Consider there is a list containing N numbers, and which formed a ring. That is, item n+1 is item 1. Construct an algorithm such that it traverses through the ring, and

app Interview Practice 17 - Find The String Appeared Once Question Given a string, write an algorithm to find the character inside that appeared only once. For example, the result for string “abaccdeff” is b. Solution We can use a hashtable to count

extra Interview Practice Extra 01 - Find Loop in Linked List Question Validate a linked list whether there is a loop in it. That is, there is a node in a linked list with the next pointer pointing to a node ahead in the

find Interview Practice 14 - Find Integer With Wanted Sum Question Given a sorted integer list and an integer, find two integer in the list such that the sum of the two integers equals the given integer. It is required that the time

cha Interview Practice 13 - Last Kth Node of Linked List Question Given a linked list, find the Kth last node in a linked list. The last 0th node is the tail node in the linked list. Solution Easy task. Construct 2 pointers: P1

binary Interview Practice 11 - Greatest Distance Between Two Nodes in Binary Tree Question Get the greatest distance between two nodes in a binary tree. Assume links between nodes are bidirectional. Distance is defined as the amount of nodes connected along the path linked two nodes.

app Interview Practice 10 - Reverse Sentence Question Simple task, reverse words in a sentence. Solution In Python, this can be simple because of the build-in functions. We can just split the sentence by spaces, reverse the list, and join

code Interview Practice 03 - Longest Sequence that Makes the Greatest Sum Question 输入一个整形数组，数组里有正数也有负数。 数组中连续的一个或多个整数组成一个子数组，每个子数组都有一个和。 求所有子数组的和的最大值。要求时间复杂度为O(n)。 例如输入的数组为1, -2, 3, 10, -4, 7, 2, -5，和最大的子数组为3, 10, -4, 7, 2， 因此输出为该子数组的和18。 From a set of positive and negative integers, find the longest

agent Find the User Agent Strings of any Mobile Devices It’s quite often for a developer to make use of the user agent to determine what browser does a user used, especially for those who develop web services and websites. Recently I

alter Mbox Mail for Mac works on Lion with Thurderbird Fix Mbox Mail for Mac with Apple Mail 5, please see this post: Fix Mbox Mail for Mac on Lion, works Apple Mail 5 After the new Mac OSX Lion released, there has

app Crack Mbox Mail for Mac Actually this method has been used for over a year already. I am surprised why I could not find another hacker posting this. Anyway, I assume I invented this. To crack it, it

app Showing and hiding the hidden files in Mac It’s easy! Open Terminal and run the following commands [sourcecode language=”bash”] Show hidden files defaults write com.apple.finder AppleShowAllFiles TRUE killall Finder [/sourcecode] [sourcecode language=”bash”] Hide hidden files defaults

comment Mail Checker Lite: Nicholas Workshop [![](https://i2.wp.com/nicholasworkshop.com/wp-content/uploads/2016/10/340b3-icon128.png?w=1170)](https://chrome.google.com/extensions/detail/gpmpdgciblcggldoiafnecomgiikleah)[**Mail Checker Lite: Nicholas Workshop**](https://chrome.google.com/extensions/detail/gpmpdgciblcggldoiafnecomgiikleah)

app Mail Checker: Nicholas Workshop [![](https://i0.wp.com/nicholasworkshop.com/wp-content/uploads/2016/10/0752a-icon128.png?w=1170)](https://chrome.google.com/extensions/detail/bbpkoieffbjgocamogehnbghcpbpkcco)**[Mail Checker: Nicholas Workshop](https://chrome.google.com/extensions/detail/bbpkoieffbjgocamogehnbghcpbpkcco)**Thank

code Get milliseconds in VBA Do you ever find it hard to get the millisecond in your programs? In default VBA does not provide this function, however we can get it with some tricks. Create a module and

alter Compact and repair database in Access through VBA Normally, we need to go through bunch of clicks to do one action in MS Access. For example, “Compact and Repair Database”. This function can compact your database and make the file smaller.