码迷,mamicode.com
首页 >  
搜索关键字:reverse    ( 5099个结果
amazon o2 - reverse second half linked list
public ListNode reverseBetween(ListNode head, int m, int n) { if(head==null) return head; ListNode slow = head; ListNode f...
分类:其他好文   时间:2016-01-18 14:57:26    阅读次数:111
Python -- list 类
Pythonlist类常用方法classlist(object):defappend(self,p_object):#向列表中添加元素; >>>name_list [‘shuoming‘,‘python‘,‘search‘] >>>name_list.append("python") >>>name_list [‘shuoming‘,‘python‘,‘search‘,‘python‘]defclear(se..
分类:编程语言   时间:2016-01-12 15:41:55    阅读次数:200
LeetCode(7):Reverse Integer
Reverse Integer:Reverse digits of an integer. Example1: x = 123, return 321Example2: x = -123, return –321 题意:反转整数,不改变正负号。 思路: 逐步对给定的整数进行取余和求整,初始化最初的结...
分类:其他好文   时间:2016-01-11 20:12:53    阅读次数:119
Jan 10 - Reverse Linked List;Data Structure; Linked List; Pointer; Iteration & Recursion
Iteration:代码:/** * Definition for singly-linked list. * public class ListNode { * int val; * ListNode next; * ListNode(int x) { val = x; }...
分类:其他好文   时间:2016-01-11 14:06:22    阅读次数:94
django TypeError: 'module' object is not callable
原因:导入模块时直接把模块当函数使用 1 from rest_framework import reverse #import reverse module 2 3 4 5 @api_view(("GET",)) 6 def api_root(request, format=None):...
分类:其他好文   时间:2016-01-11 10:21:55    阅读次数:259
Reverse Nodes in k-Group
Given a linked list, reverse the nodes of a linked listkat a time and return its modified list.If the number of nodes is not a multiple ofkthen left-o...
分类:其他好文   时间:2016-01-11 00:03:57    阅读次数:204
Jan 08 - Reverse Bits; Binary; Integer; Bits; 复习位运算和二进制表达
复习 二进制位操作(bit operation),32bit integer 取值范围:-2^31 -- 2^31-101111111=12700000010=200000001=100000000=011111111=?111111110=?210000001=?12710000000=?128(...
分类:其他好文   时间:2016-01-10 07:04:32    阅读次数:148
12.正则_pdf书签加页码
给书签的后面加上页码,像这样: s = "\t\t1.12 第一节\t36" , 相当于在最后一个\t的位置加上页码,可以:①可以把字符串reverse,再str.split()一次,再加上页码;②用re.split()定位到最后一个\t , 分割#!/usr/bin/python#coding:u...
分类:其他好文   时间:2016-01-08 20:22:40    阅读次数:117
*Reverse Words in a String
Given an input string, reverse the string word by word. A word is defined as a sequence of non-space characters.The input string does not contain lead...
分类:其他好文   时间:2016-01-08 07:05:02    阅读次数:118
leetcode92 Reverse Linked List II
Reverse a linked list from positionmton. Do it in-place and in one-pass.For example:Given1->2->3->4->5->NULL,m= 2 andn= 4,return1->4->3->2->5->NULL.No...
分类:其他好文   时间:2016-01-06 17:57:32    阅读次数:118
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!