摘要:
1. _tkinter.TclError: no display name and no $DISPLAY environment variable 解决方案: import matplotlibmatplotlib.use('Agg')严重怀疑python2.7才用Agg。之前在3.5上,用TkA 阅读全文
摘要:
530. Minimum Absolute Difference in BST Given a binary search tree with non-negative values, find the minimum absolute difference between values of an 阅读全文
摘要:
455. Assign Cookies 解题思路: 先将两个数组按升序排序,然后从后往前遍历,当s[j] >= g[i]的时候,就把s[j]分给g[i],i,j都向前移动,count+1;否则向前移动i,直到可以找到这样的i。 还是很典型的贪心算法啊。 122. Best Time to Buy a 阅读全文