![](https://img-blog.csdnimg.cn/20201014180756930.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
leetcode之math
Shawn_Redemption
这个作者很懒,什么都没留下…
展开
-
【Leetcode】Plus One
Given a non-negative number represented as an array of digits, plus one to the number.The digits are stored such that the most significant digit is at the head of the list.这道题huang'yan原创 2014-11-08 23:06:25 · 231 阅读 · 0 评论 -
【Leetcode】Next Permutation
public void nextPermutation(int[] num) { if(num==null||num.length==0) return; int i=num.length-2; while(i>=0&&num[i]>=num[i+1]) i--; if(i>=0) {原创 2014-11-10 04:29:46 · 280 阅读 · 0 评论 -
【Leetcode】Add Binary
Given two binary strings, return their sum (also a binary string).For example,a = "11"b = "1"Return "100".这是一道二进制加法题,注意进位和原创 2014-11-10 10:36:27 · 296 阅读 · 0 评论 -
【Leetcode】Valid Sudoku
public boolean isValidSudoku(char[][] board) { if (board == null || board.length != 9 || board[0].length != 9) return false; for (int i = 0; i < 9; i++) { boolean[] table = new boolean[9];原创 2014-11-10 03:39:39 · 269 阅读 · 0 评论 -
【Leetcode】Permutation Sequence
The set [1,2,3,…,n] contains a total of n! unique permutations.By listing and labeling all of the permutations in order,We get the following sequence (ie, for n = 3):"123""132""213""231""3原创 2014-11-13 10:53:19 · 408 阅读 · 0 评论 -
【Leetcode】Reverse Integer
Reverse digits of an integer.Example1: x = 123, return 321Example2: x = -123, return -321这道题是一道hen原创 2014-10-31 08:18:55 · 340 阅读 · 0 评论 -
【Leetcode】Palindrome Number
Determine whether an integer is a palindrome. Do this without extra space.拿到这道题第一个思维就是去模仿reverse integer那道题的思路把一个数fan原创 2014-11-06 13:24:11 · 356 阅读 · 0 评论