- 博客(4)
- 收藏
- 关注
原创 python面试题——数组
1.anagram查看两个数组是不是相同的字符组成def anagram2(s1,s2): # Remove spaces and lowercase letters s1 = s1.replace(' ','').lower() s2 = s2.replace(' ','').lower() # Edge Case to check if sa...
2018-02-23 21:17:20
473
原创 python的container
1.python中container简介:有序数组:#list: [1, 2, 3] #tuple 一经定义就不可修改 ('a', 'b', 'c') #range: list(range(0, 30, 5)) #string: '01234567'有序数组都可以根据下标来查询。无序数组:#set: set('abc') #frozenset 一经创建就不可改变 frozenset('ab')Ma...
2018-02-23 20:42:10
954
原创 Big O算法复杂度
1. Big O介绍大O符号(Big O notation)是用于描述函数渐进行为的数学符号。它是用另一个(通常更简单的)函数来描述一个函数数量级的渐近上界。在计算机科学中,用它来描述算法的复杂度。2.Big O 算法复杂度a.O(1) Constantdef func_constant(values): ''' Prints first item in a list of val...
2018-02-23 20:00:54
1539
原创 自然语言处理——Seq2Seq_01
1.Padding: First, we need to convert the variable length into fixed length sequence by padding. Take the following query-response as the example. Q: How are you? A: I'm fine. After the paddin
2018-01-23 21:47:55
330
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人