python
偶尔冒泡
这个作者很懒,什么都没留下…
展开
-
python 中 值传递 引用传递 可更改(mutable)与不可更改(immutable)对象
部分内容参考自可更改(mutable)与不可更改(immutable)对象python中,strings, tuples, 和numbers是不可更改的对象,list,dict等则是可以修改的对象。例子nfoo = 1nfoo = 2lstFoo = [1]lstFoo[0] = 2代码第2行中,内存中原始的1对象因为不能改变,于是被“抛弃”,另nfoo指原创 2017-07-12 22:24:53 · 1070 阅读 · 0 评论 -
leetcode 1. Two Sum python
闲的蛋疼,每天刷刷。可是发现自己第一题都不会啊,所以记录下来,方便自己复习。题目Given an array of integers, return indices of the two numbers such that they add up to a specific target.You may assume that each input would have exact原创 2017-07-13 12:32:48 · 176 阅读 · 0 评论 -
leetcode 2. Add Two Numbers python
题目You are given two non-empty linked lists representing two non-negative integers. The digits are stored in reverse order and each of their nodes contain a single digit. Add the two numbers and retu原创 2017-07-13 17:04:22 · 258 阅读 · 0 评论 -
在命令行打开文件并定位到行
如果所示,打开文件的时候带上“+行号”就可以在打开文件的同时快速定位到对应到行。 记录下自己的学习收获,哈哈原创 2018-10-20 08:38:55 · 1012 阅读 · 0 评论