938664978
938664978
全部文章
python
AI(18)
algorithm(18)
C(6)
computer-vision(15)
cuda(2)
database(1)
fortran(1)
hardware(3)
java(1)
leetcode(39)
MathModeling(19)
matlab(5)
other(8)
robotics(13)
web-development(4)
未归档(5)
归档
标签
去牛客网
登录
/
注册
938664978的博客
全部文章
/ python
(共68篇)
one simple example of yield
Write a generator that returns every arrangement of items such that each is in one or none of two different bags. Each combination should be given as...
2020-07-14
0
494
Alphabetical Substrings
Assume s is a string of lower case characters. Write a program that prints the longest substring of s in which the letters occur in alphabetical orde...
2020-07-14
0
440
Counting bobs
Assume s is a string of lower case characters. Write a program that prints the number of times the string 'bob' occurs in s. For example, if s = 'a...
2020-07-14
0
557
Alphabetical Substrings
Assume s is a string of lower case characters. Write a program that prints the longest substring of s in which the letters occur in alphabetical orde...
2020-07-14
0
512
a simple example of trade-off from fibonacci function to fast-fibonacci function
#old recursive fib function def fib(n): if n == 0: return 1 elif n == 1: return 1 else: return fib(n-1)+fib(n-2) p...
2020-07-14
0
537
double_linked_list in Python
class Frob(object): def __init__(self, name): self.name = name self.before = None self.after = None def setBefore(self...
2020-07-14
0
483
mergesort in python
def mergesort(List): """ input : List, an integer list output : an sorted integer list """ n = len(L...
2020-07-14
0
394
check_sudoku
# Define a procedure, check_sudoku, # that takes as input a square list # of lists representing an n x n # sudoku puzzle solution and returns the bool...
2020-07-14
0
514
abacus
######################################################################### # 10-row School abacus # by # ...
2020-07-14
0
517
count_inversions in an integer list
count = 0 def merge_sort(li): if len(li) < 2: return li m = len(li) / 2 return merge(merge_sort(li[:m]), merge_sort(li[m:])) def ...
2020-07-14
0
480
首页
上一页
1
2
3
4
5
6
7
下一页
末页