xinyu04

导航

上一页 1 2 3 4 5 6 7 8 ··· 30 下一页

2022年9月30日 #

[Oracle] LeetCode 560 Subarray Sum Equals K 思维+Map

摘要: Given an array of integers nums and an integer k, return the total number of subarrays whose sum equals to k. A subarray is a contiguous non-empty seq 阅读全文

posted @ 2022-09-30 23:16 Blackzxy 阅读(8) 评论(0) 推荐(0) 编辑

[Oracle] LeetCode 146 LRU Cache 经典题

摘要: Design a data structure that follows the constraints of a Least Recently Used(LRU) cache. Implement the LRUCache class: LRUCache(int capacity) Initial 阅读全文

posted @ 2022-09-30 03:36 Blackzxy 阅读(18) 评论(0) 推荐(0) 编辑

2022年9月28日 #

[Oracle] LeetCode 123 Best Time to Buy and Sell Stock III 双向DP

摘要: You are given an array prices where prices[i] is the price of a given stock on the $i$-th day. Find the maximum profit you can achieve. You may comple 阅读全文

posted @ 2022-09-28 14:40 Blackzxy 阅读(10) 评论(0) 推荐(0) 编辑

2022年9月27日 #

[Oracle] LeetCode 227 Basic Calculator II

摘要: Given a string s which represents an expression, evaluate this expression and return its value. The integer division should truncate toward zero. You 阅读全文

posted @ 2022-09-27 22:22 Blackzxy 阅读(11) 评论(0) 推荐(0) 编辑

[Oracle] LeetCode 88 Merge Sorted Array 双指针

摘要: You are given two integer arrays nums1 and nums2, sorted in non-decreasing order, and two integers m and n, representing the number of elements in num 阅读全文

posted @ 2022-09-27 17:16 Blackzxy 阅读(10) 评论(0) 推荐(0) 编辑

[Oracle] LeetCode 1290 Convert Binary Number in a Linked List to Integer

摘要: Given head which is a reference node to a singly-linked list. The value of each node in the linked list is either 0 or 1. The linked list holds the bi 阅读全文

posted @ 2022-09-27 05:20 Blackzxy 阅读(10) 评论(0) 推荐(0) 编辑

[Oracle] LeetCode 450 Delete Node in a BST

摘要: Given a root node reference of a BST and a key, delete the node with the given key in the BST. Return the root node reference (possibly updated) of th 阅读全文

posted @ 2022-09-27 03:23 Blackzxy 阅读(8) 评论(0) 推荐(0) 编辑

2022年9月26日 #

[Oracle] LeetCode 32 Longest Valid Parentheses 思维

摘要: Given a string containing just the characters '(' and ')', find the length of the longest valid (well-formed) parentheses substring. Solution 不妨把左括号记为 阅读全文

posted @ 2022-09-26 16:21 Blackzxy 阅读(12) 评论(0) 推荐(0) 编辑

[Oracle] LeetCode 76 Minimum Window Substring 双指针

摘要: Given two strings s and t of lengths m and n respectively, return the minimum window substring of s such that every character in t (including duplicat 阅读全文

posted @ 2022-09-26 05:26 Blackzxy 阅读(11) 评论(0) 推荐(0) 编辑

2022年9月25日 #

[Oracle] LeetCode 1636 Sort Array by Increasing Frequency 双map

摘要: Given an array of integers nums, sort the array in increasing order based on the frequency of the values. If multiple values have the same frequency, 阅读全文

posted @ 2022-09-25 21:33 Blackzxy 阅读(17) 评论(0) 推荐(0) 编辑

上一页 1 2 3 4 5 6 7 8 ··· 30 下一页