自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(10)
  • 收藏
  • 关注

原创 Leetcode---Integer to Roman & Roman to Integer

Given an integer, convert it to a roman numeral.Input is guaranteed to be within the range from 1 to 3999.public class Solution { public String intToRoman(int num) { String[][] base = new ...

2018-03-20 20:17:10 124

原创 Leetcode---Valid Palindrome

Given a string, determine if it is a palindrome, considering only alphanumeric characters and ignoring cases.For example,"A man, a plan, a canal: Panama"is a palindrome."race a car" is not a palindrom...

2018-03-20 16:53:53 115

原创 Leetcode---Insertion Sort List

Sort a linked list using insertion sort./** * Definition for singly-linked list. * public class ListNode { * int val; * ListNode next; * ListNode(int x) { * val = x; * ...

2018-03-17 10:23:48 125

原创 Leetcode---Single Number I & II

Given an array of integers, every element appears twice except for one. Find that single one.Note: Your algorithm should have a linear runtime complexity. Could you implement it without using extra me...

2018-03-16 20:20:34 180

原创 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 converting the intege...

2018-03-15 17:26:27 123

原创 Leetcode---Reverse Integer

Reverse digits of an integer.Example1: x = 123, return 321Example2: x = -123, return -321Have you thought about this?Here are some good questions to ask before coding. Bonus points for you if you have...

2018-03-15 16:22:35 91

原创 Leetcode---Evaluate Reverse Polish Notation

Evaluate the value of an arithmetic expression in Reverse Polish Notation.Valid operators are+,-,*,/. Each operand may be an integer or another expression.import java.util.Stack;public class Solutio...

2018-03-15 15:59:25 166

原创 Leetcode---Best Time to Buy and Sell Stock III

Say you have an array for which the i th element is the price of a given stock on day i.Design an algorithm to find the maximum profit. You may complete at most two transactions.Note: You may not enga...

2018-03-14 22:26:03 122

原创 Leetcode---Best Time to Buy and Sell Stock I & II

Say you have an array for which the i th element is the price of a given stock on day i.If you were only permitted to complete at most one transaction (ie, buy one and sell one share of the stock), de...

2018-03-14 16:53:14 113

原创 Leetcode---Maximum Depth of Binary Tree & Minimum Depth of Binary Tree

Given a binary tree, find its maximum depth.The maximum depth is the number of nodes along the longest path from the root node down to the farthest leaf node./** * Definition for binary tree * publi...

2018-03-14 15:37:43 110

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除