自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

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

原创 Project

2018"百度之星"程序设计大赛子串查询Problem DescriptionInput第一行包含一个整数 TTT,表示有 TTT 组测试数据。接下来依次描述 TTT 组测试数据。对于每组测试数据:第一行包含两个整数 nnn 和 qqq,表示字符串的长度以及询问的次数。第二行包含一个长为 nnn 的只包含大写英文字母的字符串 A[1,n]A[1,n]A[1,n]。接下来 qqq ...

2018-12-23 17:44:41 187

原创 LeetCode Week 16

129. Sum Root to Leaf NumbersGiven a binary tree containing digits from 0-9 only, each root-to-leaf path could represent a number.An example is the root-to-leaf path 1->2->3 which represents t...

2018-12-18 21:28:51 220

原创 LeetCode Week 15

19. Remove Nth Node From End of ListGiven a linked list, remove the n-th node from the end of list and return its head.Example:Given linked list: 1->2->3->4->5, and n = 2.After removin...

2018-12-16 22:34:04 139

原创 LeetCode Week 14

948. Bag of TokensYou have an initial power P, an initial score of 0 points, and a bag of tokens.Each token can be used at most once, has a value token[i], and has potentially two ways to use it.If...

2018-12-08 10:08:33 154

原创 LeetCode Week 13

950. Reveal Cards In Increasing OrderIn a deck of cards, every card has a unique integer. You can order the deck in any order you want.Initially, all the cards start face down (unrevealed) in one d...

2018-12-07 20:49:32 226

原创 LeetCode Week 12

402. Remove K DigitsGiven a non-negative integer num represented as a string, remove k digits from the number so that the new number is the smallest possible.Note:The length of num is less than 100...

2018-11-22 23:13:09 238

原创 LeetCode Week 11

18. 4SumGiven an array nums of n integers and an integer target, are there elements a, b, c, and d in nums such that a + b + c + d = target? Find all unique quadruplets in the array which gives the s...

2018-11-13 20:59:33 156

原创 LeetCode Week 10

103. Binary Tree Zigzag Level Order TraversalGiven a binary tree, return the zigzag level order traversal of its nodes’ values. (ie, from left to right, then right to left for the next level and alte...

2018-11-09 22:11:22 401

原创 LeetCode Week 9

29. Divide Two IntegersGiven two integers dividend and divisor, divide two integers without using multiplication, division and mod operator.Return the quotient after dividing dividend by divisor.Th...

2018-10-30 22:49:19 169

原创 LeetCode Week 8

95. Unique Binary Search Trees IIGiven an integer n, generate all structurally unique BST’s (binary search trees) that store values 1 … n.solutions:本题意是输入一个整数,输出以1-n的整数构造的 BST's(binary search tree...

2018-10-25 23:01:27 179

原创 LeetCode Week 7

145. Binary Tree Postorder TraversalGiven a binary tree, return the postorder traversal of its nodes’ values.solutions:本题意是要求用迭代的方法而不是递归输出一颗二叉树的后序遍历。对于后序遍历与之前的前序与中序不同的是,在访问根节点之前需要对它的左右子树进行判断,对它的判...

2018-10-17 19:25:00 261

原创 LeetCode Week 6

144. Binary Tree Preorder TraversalGiven a binary tree, return the preorder traversal of its nodes’ values.solutions:本题意是要求不使用递归而是用迭代的方法输出一颗二叉树的前序遍历。对于前序遍历,先访问根节点,再访问左子树,最后访问右子树。先访问root节点,并将它和它的...

2018-10-11 18:23:12 164

原创 LeetCode Week 5

105. Construct Binary Tree from Preorder and Inorder TraversalGiven preorder and inorder traversal of a tree, construct the binary tree.Note:You may assume that duplicates do not exist in the tree....

2018-10-02 16:46:17 249

原创 LeetCode Week 4

94. Binary Tree Inorder TraversalGiven a binary tree, return the inorder traversal of its nodes’ values.Example:Follow up: Recursive solution is trivial, could you do it iteratively?solutions:本题...

2018-09-27 20:52:38 182

原创 LeetCode Week3

113. Path Sum IIGiven a binary tree and a sum, find all root-to-leaf paths where each path’s sum equals the given sum.Note: A leaf is a node with no children.Example:Given the below binary tree an...

2018-09-18 22:34:24 164

原创 LeetCode Week 2

215. Kth Largest Element in an ArrayFind the kth largest element in an unsorted array. Note that it is the kth largest element in the sorted order, not the kth distinct element.Example 1:Input: ...

2018-09-11 21:31:48 202

原创 LeetCode Week 1

35. Search Insert PositionGiven a sorted array and a target value, return the index if the target is found. If not, return the index where it would be if it were inserted in order.You may assume n...

2018-09-06 16:44:11 241

空空如也

空空如也

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

TA关注的人

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