- 博客(10)
- 收藏
- 关注
原创 快速排序 算法导论
我从我的文本编辑器复制到博客上,请问一下这算不算copy? #include using namespace std; // two kind of partions // partion one: from CLRS // use the last element a[r] as pivot int partition(int a[], int p, int r){ // i will b
2015-03-03 11:59:35 637
原创 Python在Win8.1上安装完之后,Python在安装pip时报错的问题
Python在Win8.1上安装完之后,Python在安装pip时报错,我这次发现的问题按照网上很多修改编码的方法之后,还是不行。发现自己的用户名是由hotmail/Outlook的信息———我的中文名字决定的。这样我的用户名就是中文了。用执行python get-pip.py 的方法安装pip的时候,注意到出错的原因似乎和目录里的中文字有关系。于是新建了一个以拼音作为名字的用户,就这样, pip
2014-12-16 17:41:44 1392
原创 判断字符串是不是回文,使用C++、Python两种语言
// 这里的题目使用 “C++和Python" 两种语言解决 //题目, 判断一个字符串是不是“回文” #include using namespace std; //! core bool is_palindrome(char * s){ int end = strlen(s) - 1; int pre = 0; while(pre < end){ if(s[pre] !
2014-12-02 20:45:20 4747 1
原创 Python算法笔试题目,破解Hash值,N进制法
Find the string whichhas this hash: 25267566250558 The string has length8. Characters can befrom: c,e,i,a,r,w,u,s,p The hash functionworks like this: hash(str): 1.LETTERS = c,
2014-10-13 22:13:35 921
原创 Python算法笔试题目,破解Hash值,回溯法
Find the string which has this hash: 25267566250558 The string has length8. Characters can befrom: c,e,i,a,r,w,u,s,p The hash functionworks like this: hash(str): 1.LETTERS = c
2014-10-13 22:07:46 1536
原创 Python笔试题目:求最大的K个数子,解法三,适合大型数据集的情况
Givena array of 10,000 random intergers, select the biggest 100 numbers. 1)The order of the result numbers does not matter; 2)Take care about the algorithm performance and big O complexi
2014-10-13 22:05:50 1492
原创 Python笔试题目:求最大的K个数子,解法二,适合小型数据集的情况
题目: Givena array of 10,000 random intergers, select the biggest 100 numbers. 1)The order of the result numbers does not matter; 2)Take care about the algorithm performance and big O
2014-10-13 22:00:31 723
原创 Python笔试题目:求最大的K个数子,解法一,最快速实现的方法
题目: Givena array of 10,000 random intergers, select the biggest 100 numbers. 1)The order of the result numbers does not matter; 2)Take care about the algorithm performance and big O complex
2014-10-13 21:45:19 927
原创 使用python批量修改文件的后缀
今天下载到一本书的源代码,但是 #coding=utf-8 import os import os.path rootdir = "C:\Users\gca\Desktop\Data Structures and Algorithms with Object-Oriented Design Patterns in Python - Bruno R. Preiss progr
2014-10-06 23:25:55 786
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人