码迷,mamicode.com
首页 >  
搜索关键字:reverse nodes    ( 8673个结果
反转字符串
$a="asdfghjklqwe"$b=$nullforeach ($_ in ("$a".length-1)..0){$b +=$a[$_]}$b$a="asdfghjklqwe"$b = $a.ToCharArray()[array]::Reverse($b)$b -join ''
分类:其他好文   时间:2014-08-25 16:47:54    阅读次数:153
14. Reverse Linked List II
总结:其实就是反转链表。不过是反转中间一部分。要注意的是保存第一个结点的前继的指针; 若第一个结点是头结点,注意反转子串的尾结点变为头结点。
分类:其他好文   时间:2014-08-25 01:07:43    阅读次数:198
LeetCode Recover Binary Search Tree
class Solution {private: vector nodes;public: void recoverTree(TreeNode *root) { nodes.clear(); dfs(root); // 1 5 3 4 2 6 7...
分类:其他好文   时间:2014-08-25 01:07:23    阅读次数:329
POJ 3237 Tree
TreeTime Limit: 5000MSMemory Limit: 131072KTotal Submissions: 3836Accepted: 1088DescriptionYou are given a tree with N nodes. The tree’s nodes are num...
分类:其他好文   时间:2014-08-25 01:06:53    阅读次数:313
【Leet Code】Add Two Numbers
Add Two Numbers  Total Accepted: 20255 Total Submissions: 88115My Submissions You are given two linked lists representing two non-negative numbers. The digits are stored in reverse order a...
分类:其他好文   时间:2014-08-23 21:40:01    阅读次数:200
[POJ 1308]Is It A Tree?(并查集判断图是否为一棵有根树)
Description A tree is a well-known data structure that is either empty (null, void, nothing) or is a set of one or more nodes connected by directed edges between nodes satisfying the following proper...
分类:其他好文   时间:2014-08-23 17:46:41    阅读次数:218
Remove Duplicates from Sorted List II
Remove Duplicates from Sorted List II  Total Accepted: 17137 Total Submissions: 69046My Submissions Given a sorted linked list, delete all nodes that have duplicate numbers, leaving only d...
分类:其他好文   时间:2014-08-23 14:00:40    阅读次数:187
Remove Duplicates from Sorted List II
Given a sorted linked list, delete all nodes that have duplicate numbers, leaving only distinct numbers from the original list.For example,Given 1->2-...
分类:其他好文   时间:2014-08-22 22:22:09    阅读次数:233
Elasticsearch升级到1.2(1.x)API的变化-二
一、统计信息相关命令的变化 有关集群状态cluster_state, 节点信息nodes_info, 节点统计信息nodes_stats和索引信息indices_stats命令格式进行了统一,比如查看集群信息使用命令: curl -XGET http://localhost:9200/_cluster/state/nodes?pretty=1 查看节点统计信息: curl ...
分类:Windows程序   时间:2014-08-22 21:13:39    阅读次数:494
[Int Basics] coding & OO questions
Example 1: Write a function to reverse a string.Example Java code: public static String reverse ( String s ) { int length = s.length(), last =length ....
分类:其他好文   时间:2014-08-22 19:42:59    阅读次数:236
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!