码迷,mamicode.com
首页 >  
搜索关键字:should    ( 4948个结果
LeetCode: Populating Next Right Pointers in Each Node [116]
【题目】 Given a binary tree struct TreeLinkNode { TreeLinkNode *left; TreeLinkNode *right; TreeLinkNode *next; } Populate each next pointer to point to its next right node. If there is no next right node, the next pointer should be...
分类:其他好文   时间:2014-06-07 14:28:36    阅读次数:215
LeetCode: Flatten Binary Tree to Linked List [114]
【题目】 Given a binary tree, flatten it to a linked list in-place. For example, Given 1 / 2 5 / \ 3 4 6 The flattened tree should look like: 1 2 3 4 \...
分类:其他好文   时间:2014-06-07 11:37:00    阅读次数:153
【LeetCode】Partition List
Partition ListGiven a linked list and a valuex, partition it such that all nodes less thanxcome before nodes greater than or equal tox.You should pres...
分类:其他好文   时间:2014-06-07 06:24:57    阅读次数:179
A debugger is already attached
Today is the last day that all the laptops of winXP OS should be upgrade to WIN7. After updated. when i tried to debug my application,i received this ...
分类:其他好文   时间:2014-06-06 15:51:14    阅读次数:275
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 nu...
分类:其他好文   时间:2014-06-05 14:15:07    阅读次数:221
Drawable.Callback
一。介绍public abstract void invalidateDrawable (Drawable who)Called when the drawable needs to be redrawn. A view at this point should invalidate itself ...
分类:其他好文   时间:2014-06-05 14:13:44    阅读次数:218
leetcode--Swap Nodes in Pairs
Given a linked list, swap every two adjacent nodes and return its head.For example,Given1->2->3->4, you should return the list as2->1->4->3.Your algor...
分类:其他好文   时间:2014-06-05 13:41:44    阅读次数:231
CF(438D) The Child and Sequence(线段树)
题意:对数列有三种操作: Print operation l,?r. Picks should write down the value of . Modulo operation l,?r,?x. Picks should perform assignment a[i]?=?a[i] mod x for each i (l?≤?i?≤?r). Set operation k...
分类:其他好文   时间:2014-06-02 02:56:56    阅读次数:465
LeetCode: Unique Binary Search Trees II [096]
【题目】 Given n, generate all structurally unique BST's (binary search trees) that store values 1...n. For example, Given n = 3, your program should return all 5 unique BST's shown below. 1 3 3 2 1 \ / / / \ ...
分类:其他好文   时间:2014-06-01 15:33:45    阅读次数:297
每日算法之二十三:Reverse Nodes in k-Group
Given a linked list, reverse the nodes of a linked list k at a time and return its modified list. If the number of nodes is not a multiple of k then left-out nodes in the end should remain as it is...
分类:其他好文   时间:2014-06-01 09:05:42    阅读次数:271
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!