码迷,mamicode.com
首页 >  
搜索关键字:reverse nodes    ( 8673个结果
LeetCode OJ——练习笔记(1)Evaluate Reverse Polish Notation
院招终于开始了,然后期待与兴奋过后却是面临着笔试一次又一次的失败,然后开始留意到LeetCode。也想自己去体验一下诸多大牛通向无限coding路上都攻克过的一关。话不多说,贴出原题:Evaluate the value of an arithmetic expression inReverse P...
分类:其他好文   时间:2014-07-03 22:01:50    阅读次数:202
Leetcode Binary Tree Inorder Traversal
Given a binary tree, return theinordertraversal of its nodes' values.For example:Given binary tree{1,#,2,3}, 1 \ 2 / 3return[1,3,2].Note...
分类:其他好文   时间:2014-07-02 22:49:05    阅读次数:249
[leetcode] Reverse Linked List II
Reverse a linked list from position m to n. Do it in-place and in one-pass.
分类:其他好文   时间:2014-07-02 20:12:57    阅读次数:182
[leetcode] Partition List
Given a linked list and a value x, partition it such that all nodes less than x come before nodes greater than or equal to x.
分类:其他好文   时间:2014-07-02 10:01:21    阅读次数:173
LeetCode: Reverse Words in a String [151]
【题目】 Given an input string, reverse the string word by word. For example, Given s = "the sky is blue", return "blue is sky the". click to show clarification. Clarification: What constitutes a word? A sequence of non-space characters constitutes a word....
分类:其他好文   时间:2014-07-02 08:34:34    阅读次数:170
LeetCode: Evaluate Reverse Polish Notation [150]
【题目】 Evaluate the value of an arithmetic expression in Reverse Polish Notation. Valid operators are +, -, *, /. Each operand may be an integer or another expression. Some examples: ["2", "1", "+", "3", "*"] -> ((2 + 1) * 3) -> 9 ["4", "13", "5", "/...
分类:其他好文   时间:2014-07-02 07:43:36    阅读次数:212
Leetcode:Merge Two Sorted Lists 合并两个有序单链表
Merge two sorted linked lists and return it as a new list. The new list should be made by splicing together the nodes of the first two lists. 代码如下: * Definition for singly-linked list. * struct L...
分类:其他好文   时间:2014-07-02 07:23:59    阅读次数:159
ansible(五)variables(一)定义
说起变量,ansible中的变量,差不多等于salt-stack里面的pillar+grains吧ansible中的变量主要来源于,楼主总结了一下,大概有这么几个地方吧Inventory(hostvars,groupvars)playbook里面命令行roles里面来自于nodes上面的facts这些类型的变量,1-4一般来说都是咱们用户自己定义..
分类:其他好文   时间:2014-07-02 06:10:50    阅读次数:283
[Leetcode]Add Two Numbers
题目 You are given two linked lists representing two non-negative numbers. The digits are stored in reverse order and each of their nodes contain a single digit. Add the two numbers and return it a...
分类:其他好文   时间:2014-07-01 09:11:07    阅读次数:206
Reorder List
题目 Given a singly linked list L: L0→L1→…→Ln-1→Ln, reorder it to: L0→Ln→L1→Ln-1→L2→Ln-2→… You must do this in-place without altering the nodes' values. For example, Given {1,2,3,4}, re...
分类:其他好文   时间:2014-07-01 08:39:24    阅读次数:181
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!