摘要:
Python解决方法: class Solution(object): def sortArrayByParityII(self, A): j = 1 for i in xrange(0, len(A), 2): if A[i] % 2: while A[j] % 2: j += 2 A[i], A 阅读全文
摘要:
Python解法代码: class Solution: def intersect(self, nums1: List[int], nums2: List[int]) -> List[int]: nums1.sort() nums2.sort() r = [] i = j = 0 while i < 阅读全文
摘要:
C++解题方法: class Solution { public: vector<int> intersection(vector<int>& nums1, vector<int>& nums2) { unordered_set<int> u; vector<int> answer; for(int 阅读全文
摘要:
C++解题代码: class Solutiion { public: bool isAnagram(string s, string t) { int *data = new int[26](); int n = s.length(); int m = t.length(); int temp; i 阅读全文
摘要:
二分查询: def binary_search(list, item): low = 0 high = len(list)-1 while low <= high: mid = (low + high) / 2 guess = list[mid] if guess == item: return m 阅读全文
摘要:
if : elif : else : print('{0} \n{1} \n{2}' .format((a + b), (a - b), (a * b))) print(*[num**2 for num in range(n)], sep = '\n') def f(): return condit 阅读全文
摘要:
1. left join on 与 right join on, inner join on 的区别: left join on 把左表中的行全部展示,而将寻找右表中符合的行展示; right join on 把右表中的行全部展示,而将匹配左表中符合的行展示; inner join on 只展示两表 阅读全文
摘要:
主要涉及到: Python, MongoDB, Redis, MySQL以及python爬虫常用库的安装;可视化图形界面包括:Robo 3T,Redis, Navicat for MySQL python: 我电脑有python3.5 和3.7两个版本。环境是配置的sublime_text3 pyt 阅读全文