摘要:
https://leetcode.com/problems/multiply-strings/Given two numbers represented as strings, return multiplication of the numbers as a string.Note: The nu... 阅读全文
摘要:
https://leetcode.com/problems/largest-number/Given a list of non negative integers, arrange them such that they form the largest number.For example, g... 阅读全文
摘要:
https://leetcode.com/problems/largest-rectangle-in-histogram/ Given n non-negative integers representing the histogram's bar height where the width of 阅读全文
摘要:
这个问题其实来源于Leetcode的一道题目,也就是上一篇日志 LRU Cache。在使用LinkedList超时后,换成ArrayList居然AC了,而问题居然是在于List.remove(Object o)这个方法。 我们知道,链表和数组相比,最主要的特点就是add和remove的操作是O(1) 阅读全文
摘要:
https://leetcode.com/problems/lru-cache/Design and implement a data structure for Least Recently Used (LRU) cache. It should support the following ope... 阅读全文