摘要:
Given two arrays, write a function to compute their intersection. Example:Given nums1 = [1, 2, 2, 1], nums2 = [2, 2], return [2, 2]. Note: Each elemen 阅读全文
摘要:
Write a program to find the n-th ugly number. Ugly numbers are positive numbers whose prime factors only include 2, 3, 5. For example, 1, 2, 3, 4, 5, 阅读全文
摘要:
Given a string, sort it in decreasing order based on the frequency of characters. Example 1: Input: "tree" Output: "eert" Explanation: 'e' appears twi 阅读全文
摘要:
Given a list of 24-hour clock time points in "Hour:Minutes" format, find the minimum minutes difference between any two time points in the list. Examp 阅读全文
摘要:
Given two non-negative integers num1 and num2 represented as string, return the sum of num1 and num2. Note: 思路: 模拟手工加法过程,用carry表示进位。 第一个是自己写的,比较啰嗦。 第二 阅读全文
摘要:
Given an array containing n distinct numbers taken from 0, 1, 2, ..., n, find the one that is missing from the array. For example,Given nums = [0, 1, 阅读全文
摘要:
Find the sum of all left leaves in a given binary tree. Example: 阅读全文
摘要:
转载自:http://www.cnblogs.com/haore147/p/3618930.html 1. 安装两个软件 1 2 1. git的命令行程序--git for windows:http://git-scm.com/download/win 2. git的GUI程序--tortoiseg 阅读全文
摘要:
Given an arbitrary ransom note string and another string containing letters from all the magazines, write a function that will return true if the rans 阅读全文
摘要:
Given a non-empty integer array of size n, find the minimum number of moves required to make all array elements equal, where a move is incrementing n 阅读全文