摘要:
Implement pow(x, n), which calculates x raised to the power n (i.e. xn). 方法一: 递归 public double quickMul(double x, long N) { if (N == 0) { return 1.0; 阅读全文
摘要:
Given an array of strings strs, group the anagrams together. You can return the answer in any order. An Anagram is a word or phrase formed by rearrang 阅读全文
摘要:
You are given an n x n 2D matrix representing an image, rotate the image by 90 degrees (clockwise). You have to rotate the image in-place, which means 阅读全文
摘要:
Given a collection of numbers, nums, that might contain duplicates, return all possible unique permutations in any order. 方法: 回溯法,去重 boolean[] vis; pu 阅读全文
摘要:
Given an array nums of distinct integers, return all the possible permutations. You can return the answer in any order. 方法 : 回溯法。 public List<List<Int 阅读全文
摘要:
Given an array of non-negative integers nums, you are initially positioned at the first index of the array. Each element in the array represents your 阅读全文
摘要:
Given an input string (s) and a pattern (p), implement wildcard pattern matching with support for '?' and '*' where: '?' Matches any single character. 阅读全文