
算法
文章平均质量分 63
Ricecongee
这个作者很懒,什么都没留下…
展开
-
[LeetCode]Reverse Integer
Reverse digits of an integer. Example1: x = 123, return 321 Example2: x = -123, return -321 click to show spoilers. Note: The input is assumed to be a 32-bit signed integer. Your function原创 2017-09-23 22:49:14 · 494 阅读 · 0 评论 -
某笔试题(一)获取20个随机不重复的字符
import java.util.ArrayList; import java.util.Random; public class sort { public static void main(String[] args){ System.out.println(get()); } public static ArrayList get(){原创 2017-09-23 23:02:15 · 757 阅读 · 0 评论 -
[LeetCode] binary-tree-preorder-traversal
Given a binary tree, return the preorder traversal of its nodes' values. For example: Given binary tree{1,#,2,3}, 1 \ 2 / 3 return[1,2,3]. Note: Recursive solution原创 2017-09-23 22:51:54 · 308 阅读 · 0 评论 -
[LeetCode] Palindrome Number
Determine whether an integer is a palindrome. Do this without extra space. click to show spoilers. Some hints: Could negative integers be palindromes? (ie, -1) If you are thinking of convertin原创 2017-09-24 09:37:59 · 450 阅读 · 0 评论 -
[LeetCode] Roman to Integer
Given a roman numeral, convert it to an integer. Input is guaranteed to be within the range from 1 to 3999. 分析: 1~9: {"I", "II", "III", "IV", "V", "VI", "VII", "VIII", "IX"}; 10~90: {"X",原创 2017-09-24 11:42:49 · 330 阅读 · 0 评论