- 博客(4)
- 收藏
- 关注
原创 【Leetcode】69. Sqrt(x) (Easy)
1.题目 Implement int sqrt(int x). Compute and return the square root of x. x is guaranteed to be a non-negative integer. Example 1: Input: 4 Output: 2 Example 2: Input: 8 Output:
2018-01-30 15:07:40 204
原创 【Leetcode】122. Best Time to Buy and Sell Stock II(Easy)
1.题目 Say you have an array for which the ith element is the price of a given stock on day i. Design an algorithm to find the maximum profit. You may complete as many transactions as you like (
2018-01-30 14:52:06 175
原创 【Leetcode】108. Convert Sorted Array to Binary Search Tree(Easy)
1.题目 Given an array where elements are sorted in ascending order, convert it to a height balanced BST. For this problem, a height-balanced binary tree is defined as a binary tree in which the de
2018-01-30 14:43:49 179
原创 【Java】i++,++i与i+1的区别
1.首先记录i++与++i的区别:i++返回的是进行加法前的值,++i返回的是加法执行之后的值; int i=0; System.out.println("=== i++ 与 ++i ==="); while(i++<=9){ System.out.print(i+" "); } System.out.print("\n");
2018-01-29 12:32:32 6935
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人