- 博客(7)
- 收藏
- 关注
![](https://csdnimg.cn/release/blogv2/dist/pc/img/listFixedTop.png)
原创 Python, GIL, ctypes, Jython 多线程
最近做项目要用到多线程,作为菜鸟,对python的多线程不是很了解,在查找了多方面的资料之后稍微有了一点收获,在这里做一下记录,也可以方便遇到同样问题的同学。对于Python的多线程,首先需要了解GIL(Global Interpreter Lock),下面的这篇内容很不错:《Python的GIL是什么鬼,多线程性能究竟如何》读完上面这篇文章之后你会发现,哦原来Pyth
2017-04-20 10:23:11
1145
1
原创 [leetcode]Longest Substring Without Repeating Characters(using python)
原题链接:点击打开链接题目:Given a string, find the length of the longest substring without repeating characters.Examples:Given "abcabcbb", the answer is "abc", which the length is 3.Given "bbb
2017-03-29 16:27:26
209
原创 [leetcode]Container With Most Water(using Python)
原题链接:点击打开链接题目描述:Given n non-negative integers a1, a2, ..., an, where each represents a point at coordinate (i, ai). n vertical lines are drawn such that the two endpoints of line i is at (
2017-03-23 15:16:10
186
原创 [leetcode]Rotate Array(using Python)
原题连接:点击打开链接题目:Rotate an array of n elements to the right by k steps.For example, with n = 7 and k = 3, the array [1,2,3,4,5,6,7] is rotated to [5,6,7,1,2,3,4]class Solution(object):
2017-03-16 15:27:08
477
原创 [leetcode]Reverse Words in a String(using Python)
原题链接:https://leetcode.com/problems/reverse-words-in-a-string/#/description题目描述:Given an input string, reverse the string word by word.For example,Given s = "the sky is blue",return "bl
2017-03-16 12:50:29
590
原创 [leetcode刷题] Remove Duplicates from Sorted Array
Given a sorted array, remove the duplicates in place such that each element appear only once and return the new length.Do not allocate extra space for another array, you must do this in place with
2017-03-15 15:28:10
539
原创 循环素数求解 python
数字197可以被称为循环素数,因为197的三个数位循环移位后的数字:197,971,719均为素数。100以内这样的数字包括13个,2,3,5,7,11,13,17,31,37,71,73,79,97。要求任意正整数n以内一共有多少个这样的循环素数。count = 0n = int(raw_input('n='))for i in range(2,n): bit = 0
2017-03-07 15:14:06
3191
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人