- 博客(6)
- 资源 (2)
- 问答 (2)
- 收藏
- 关注
原创 leetcode 3sum
原题:Given an array S of n integers, are there elements a, b, c in S such that a + b + c = 0? Find all unique triplets in the array which gives the sum of zero.题意:给定一个数组num,求数组中三个数字相加为0的所有组合
2017-05-18 19:39:50 427
原创 leetcode two-sum
原题:Given an array of integers, find two numbers such that they add up to a specific target number.The function twoSum should return indices of the two numbers such that they add up to the targ
2017-05-18 16:47:55 290
原创 leetcode rotate-image(90°旋转矩阵)
原题:You are given an n x n 2D matrix representing an image.Rotate the image by 90 degrees (clockwise).Follow up:Could you do this in-place?题意就不多说了,比较经典的一个问题,90度顺时针旋转一个n*n的二维矩阵,难点在于只能使
2017-05-18 09:12:31 376
原创 leetcode palindrome-number(判断一个数字是否是回文)
原题:Determine whether an integer is a palindrome. Do this without extra space.题意:判断数字是否是回文思路:和上一篇 reverse Integer很类似,设该数字位num,先取到该数字的位数(如果个位计为1,10位计为10,依此类推),高位数字可以由 num/位数获得,低位数字可以由num % 10获得,
2017-05-17 17:31:45 267
原创 leetcode reverse Integer(反转整数)
原题:Reverse digits of an integer.Example1: x = 123, return 321Example2: x = -123, return -321反转一个整数,反转的过程不难,关键要注意几点1. 当一个数字末尾为0时,反转后应该去掉。比如:1200000 反转后为 21.2. 当一个整数超大不越界,但
2017-05-17 16:49:11 331
原创 leetcode maximum-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.今天开始总结之前做过的leetcode的题
2017-05-17 15:42:58 229
Nacos发送心跳给注册中心的一台机器,那其他机器是怎么更新心跳时间呢
2021-04-22
android.widget.CalendarView真机运行慢
2015-09-01
TA创建的收藏夹 TA关注的收藏夹
TA关注的人