2019年5月6日

50. Pow(x, n) (JAVA)

摘要: Implement pow(x, n), which calculates x raised to the power n(xn). Example 1: Example 2: Example 3: Note: -100.0 < x < 100.0 n is a 32-bit signed inte 阅读全文

posted @ 2019-05-06 17:03 joannae 阅读(167) 评论(0) 推荐(0) 编辑

47. Permutations II (JAVA)

摘要: Given a collection of numbers that might contain duplicates, return all possible unique permutations. Example: 有重复数字的情况,之前在Subsets II,我们采取的是在某一个递归内,用f 阅读全文

posted @ 2019-05-06 16:33 joannae 阅读(163) 评论(0) 推荐(0) 编辑

46. Permutations (JAVA)

摘要: Given a collection of distinct integers, return all possible permutations. Example: 规律:类似插入排序,每个数都有多个可插入的位置。 递归的时候:循环插入的位置。递归结束条件:插入到最后一个数。 阅读全文

posted @ 2019-05-06 15:09 joannae 阅读(204) 评论(0) 推荐(0) 编辑

45. Jump Game II (JAVA)

摘要: Given an array of non-negative integers, you are initially positioned at the first index of the array. Each element in the array represents your maxim 阅读全文

posted @ 2019-05-06 14:06 joannae 阅读(212) 评论(0) 推荐(0) 编辑

43. Multiply Strings (JAVA)

摘要: Given two non-negative integers num1 and num2represented as strings, return the product of num1 and num2, also represented as a string. Example 1: Exa 阅读全文

posted @ 2019-05-06 11:57 joannae 阅读(116) 评论(0) 推荐(0) 编辑

导航