摘要: Implement pow(x, n). Example 1: public double myPow(double x, int n) { if (n 阅读全文
posted @ 2018-03-14 10:49 binryang 阅读(91) 评论(0) 推荐(0)
摘要: Given an array of strings, group anagrams together. For example, given: , Return: 阅读全文
posted @ 2018-03-13 12:28 binryang 阅读(80) 评论(0) 推荐(0)
摘要: You are given an n x n 2D matrix representing an image. Rotate the image by 90 degrees (clockwise). Note: You have to rotate the image in place, which 阅读全文
posted @ 2018-03-09 13:34 binryang 阅读(106) 评论(0) 推荐(0)
摘要: Given a collection of distinct numbers, return all possible permutations. For example, [1,2,3] have the following permutations: public List permute(in 阅读全文
posted @ 2018-03-06 16:30 binryang 阅读(123) 评论(0) 推荐(0)
摘要: Given two non negative integers and represented as strings, return the product of and . Note: 1. The length of both num1 and num2 is =0 ; i ) { result 阅读全文
posted @ 2018-03-05 16:03 binryang 阅读(77) 评论(0) 推荐(0)
摘要: Given a collection of candidate numbers (C) and a target number (T), find all unique combinations in C where the candidate numbers sums to T. Each num 阅读全文
posted @ 2018-03-04 22:37 binryang 阅读(68) 评论(0) 推荐(0)
摘要: 1. 当list = list的时候,仅仅是地址的复制,如果修改其中一个list必定改变另外一个list 2. 当list.addall(list)的时候,只是一个浅复制,如果只是remove,和1不同的是另一个list不会改变(对于基本类型而言),当类型是类的话,如果对象的属性改变了,另一个lis 阅读全文
posted @ 2018-03-04 21:30 binryang 阅读(1467) 评论(0) 推荐(0)
摘要: Given a set of candidate numbers (C) (without duplicates) and a target number (T), find all unique combinations in C where the candidate numbers sums 阅读全文
posted @ 2018-03-04 16:52 binryang 阅读(84) 评论(0) 推荐(0)
摘要: Given a non negative integer represented as a non empty array of digits, plus one to the integer. You may assume the integer do not contain any leadin 阅读全文
posted @ 2018-03-03 19:12 binryang 阅读(133) 评论(0) 推荐(0)
摘要: Determine if a Sudoku is valid, according to: Sudoku Puzzles The Rules. The Sudoku board could be partially filled, where empty cells are filled with 阅读全文
posted @ 2018-03-03 15:56 binryang 阅读(101) 评论(0) 推荐(0)