Leetcode:Leetcode模板技巧积累

时间:2021-03-15 22:54:20
【文件属性】:
文件名称:Leetcode:Leetcode模板技巧积累
文件大小:553KB
文件格式:ZIP
更新时间:2021-03-15 22:54:20
C++ 技巧积累 异或的性质: 如果a ^ b = c,则a ^ c = b 求最大/最小异或值,可以考虑Trie classic problem: leetcode-421. Maximum XOR of Two Numbers in an Array leetcode-1707. Maximum XOR With an Element From Array subSequence问题一般可以用DP解决,复杂度为O(N ^ 2) subArray问题一般可以使用滑动窗口方法(或以DP结尾,在这种情况下本质也是一种滑动窗口方法),复杂度O(N) classic problem: leetcode-53. Maximum Subarray leetcode-992. Subarrays with K Different Integers 单调双端加速度-单队列技

网友评论