摘要:
A simple combination of Implement Trie (Prefix Tree) and Word Search. If you've solved them, this problem will become easy :-)The following code is ba... 阅读全文
摘要:
You need to understand what a Trie is before writing the code :-) This link has a nice solution, whose code is rewritten below. 1 class TrieNode { 2 p... 阅读全文
摘要:
This problem is purely to test your coding ability. Just go ahead :-) 1 class Solution { 2 public: 3 string countAndSay(int n) { 4 string ... 阅读全文
摘要:
Try to split all the numbers into two groups with each of the target one in different groups. Refer to this link for a nice explanation.The code is wr... 阅读全文
摘要:
Problem Description:Given an array ofnintegersnumsand atarget, find the number of index tripletsi, j, kwith0 & nums, int target) { 4 sort(nums... 阅读全文
摘要:
Well, no matter whether the number is happy or not, its sum-of-squared-digits sequance has a cycle. Well, do you still remember the algorithm for dete... 阅读全文