摘要:
https://leetcode-cn.com/problems/design-hashset/ 无脑操作: class MyHashSet { private List<Integer> a = new ArrayList<>(); public MyHashSet() { } public vo 阅读全文
摘要:
https://leetcode-cn.com/problems/design-circular-queue/ 请原谅我直接,这一题。。。我这么傻心里都嘀咕,怎么出得那么傻~没有灵魂得题目。 class MyCircularQueue { List<Integer> queue = new Arra 阅读全文
摘要:
https://leetcode-cn.com/problems/add-binary/ 抄来的,别人家的解决方案: class Solution { public String addBinary(String a, String b) { if(a == null || a.length() = 阅读全文
摘要:
https://leetcode-cn.com/problems/pascals-triangle/ 对,没有灵魂的代码: class Solution { public List<List<Integer>> generate(int numRows) { List<List<Integer>> 阅读全文
摘要:
https://leetcode-cn.com/problems/find-pivot-index/submissions/ 没有灵魂的低端程序狗: class Solution { public int pivotIndex(int[] nums) { if(nums.length == 1) { 阅读全文