自定义博客皮肤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)
  • 收藏
  • 关注

转载 Lintcode372 Delete Node in the Middle of Singly Linked List solution 题解

【题目描述】Implement an algorithm to delete a node in the middle of a singly linked list, given only access to that node.给定一个单链表中的一个等待被删除的节点(非表头或表尾)。请在在O(1)时间复杂度删除该链表节点。【题目链接】www.lintcode.c...

2018-04-07 09:42:00 96

转载 Lintcode371 Print Numbers by Recursion solution 题解

【题目描述】Print numbers from 1 to the largest number with N digits by recursion.NoticeIt's pretty easy to do recursion like:recursion(i) {if i > largest number:returnresults.add(i)...

2018-04-06 10:55:00 70

转载 Lintcode370 Convert Expression to Reverse Polish Notation solution 题解

【题目描述】Given an expression string array, return the Reverse Polish notation of this expression. (remove the parentheses)给定一个表达式字符串数组,返回该表达式的逆波兰表达式(即去掉括号)。【题目链接】www.lintcode.com/en/proble...

2018-04-05 13:58:00 99

转载 Lintcode368 Expression Evaluation solution 题解

【题目描述】Given an expression string array, return the final result of this expressionNotice:The expression contains only integer,+,-,*,/,(,).给一个用字符串表示的表达式数组,求出这个表达式的值。【注】:表达式只包含整数,+,-,*,/,...

2018-04-04 19:13:00 85

转载 Lintcode367 Expression Tree Build solution 题解

【题目描述】The structure of Expression Tree is a binary tree to evaluate certain expressions.All leaves of the Expression Tree have an number string value. All non-leaves of the Expression Tree ...

2018-04-02 14:00:00 73

转载 Lintcode362 Sliding Window Maximum solution 题解

【题目描述】Given an array of n integer with duplicate number, and a moving window(size k), move the window at each iteration from the start of the array, find the maximum number inside the window ...

2018-03-27 23:16:00 69

转载 Lintcode363 Trapping Rain Water solution 题解

【题目描述】Givennnon-negative integers representing an elevation map where the width of each bar is 1, compute how much water it is able to trap after raining.给定n个非负整数,表示一个...

2018-03-27 23:15:00 107

转载 Lintcode364 Trapping Rain Water II solution 题解

【题目描述】Givennxmnon-negative integers representing an elevation map 2d where the area of each cell is1x1, compute how much water it is able to trap after raining....

2018-03-27 23:14:00 97

转载 Lintcode366 Fibonacci solution 题解

【题目描述】Find theNth number in Fibonacci sequence.A Fibonacci sequence is defined as follow:The first two numbers are 0 and 1.Theith number is the sum ofi-1th number andi-2th n...

2018-03-27 23:13:00 65

转载 Lintcode365 Count 1 in Binary solution 题解

【题目描述】Count how many 1 in binary representation of a 32-bit integer.计算在一个 32 位的整数的二进制表示中有多少个1.【题目链接】www.lintcode.com/en/problem/count-1-in-binary/ 【题目解析】最容易想到的方法是对数字依次右移,判断每一位是否为1,...

2018-03-27 23:10:00 52

空空如也

空空如也

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

TA关注的人

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