轩辕龙儿
Biography
一个热衷于做小码农的程序媛!!!
Published 153 articles
Joined on 2023-09-13
162. 寻找峰值(2023-12-18)
力扣每日一题 题目:162. 寻找峰值 日期:2023-12-18 用时:10 m 9 s 时间:0 ms 内存:40.54 MB 代码: class Solution {
public int findPeakElement(int[] nums) {
if(nums.le
- 2023-12-18
- 35
- 0
- 0
- 27.5℃
2415. 反转二叉树的奇数层(2023-12-15)
力扣每日一题 题目:2415. 反转二叉树的奇数层 日期:2023-12-15 用时:6 m 51 s 时间:0 ms 内存:46.97 MB 代码: /**
* Definition for a binary tree node.
* public class TreeNode {
*
- 2023-12-15
- 47
- 0
- 0
- 28.7℃
2132. 用邮票贴满网格图(2023-12-14)
力扣每日一题 题目:2132. 用邮票贴满网格图 日期:2023-12-14 用时:38 m 32 s 思路:使用前缀和+差分,只是往常是一维,现在变二维了,原理差不多 时间:22ms 内存:98.24MB 代码: class Solution {
public boolean possib
- 2023-12-14
- 28
- 0
- 0
- 26.8℃
2697. 字典序最小回文串(2023-12-13)
力扣每日一题 题目:2697. 字典序最小回文串 日期:2023-12-13 用时:4 m 53 s 时间:7ms 内存:43.61MB 代码: class Solution {
public String makeSmallestPalindrome(String s) {
- 2023-12-13
- 35
- 0
- 0
- 27.5℃
2454. 下一个更大元素 IV(2023-12-12)
力扣每日一题 题目:2454. 下一个更大元素 IV 日期:2023-12-12 用时:35 m 09 s 时间:614ms 内存:57.18MB 代码: class Solution {
public int[] secondGreaterElement(int[] nums) {
- 2023-12-12
- 44
- 1
- 0
- 31.4℃
1466. 重新规划路线(2023-12-07)
力扣每日一题 题目:1466. 重新规划路线 日期:2023-12-07 用时:45 m 36 s 时间:37ms 内存:69.64MB 代码: class Solution {
public int minReorder(int n, int[][] connections) {
- 2023-12-07
- 24
- 0
- 0
- 26.4℃
2646. 最小化旅行的价格总和(2023-12-06)
力扣每日一题 题目:2646. 最小化旅行的价格总和 日期:2023-12-06 用时:30 m 14 s 时间:8ms 内存:42.98MB 思路:每条路上通过的城市数量实际就是图中每个节点的子节点数量,先统计旅行中每个节点路过的次数(dfs方法),再计算减半后的价格之和的最小值(dp方法),最后
- 2023-12-06
- 23
- 0
- 0
- 26.3℃
2477. 到达首都的最少油耗(2023-12-05)
力扣每日一题 题目:2477. 到达首都的最少油耗 日期:2023-12-05 用时:34 m 15 s 时间:37ms 内存:84.8MB 思路:分别计算每条路上通过的城市数量(数量/座位数,向上取整),然后求和,这里每条路上通过的城市数量实际就是图中每个节点的子节点数量。 代码:每条路上通过的城
- 2023-12-05
- 33
- 0
- 0
- 27.3℃
1038. 从二叉搜索树到更大和树(2023-12-04)
力扣每日一题
题目:[1038. 从二叉搜索树到更大和树](https://leetcode.cn/problems/binary-search-tree-to-greater-sum-tree/description/)
![2023-12-04.png](https://img.huangge
- 2023-12-04
- 21
- 0
- 0
- 26.1℃