摘要: #include <iostream> #include <list> #include <unordered_map> struct Node { int v_; Node(int v) : v_(v) {} }; class LRU { public: LRU(int capacity) : c 阅读全文
posted @ 2022-08-31 10:01 ADRUI 阅读(87) 评论(0) 推荐(0) 编辑
摘要: Solution 按位判断 考虑w进制借位 Sample Code #include <bits/stdc++.h> using namespace std; int w, m; void Do(){ if(w == 1) { cout << "YES" << endl; return; } int 阅读全文
posted @ 2021-09-22 15:13 ADRUI 阅读(29) 评论(0) 推荐(0) 编辑
摘要: 21 简单 Solution 模拟 Sample Code /** * Definition for singly-linked list. * struct ListNode { * int val; * ListNode *next; * ListNode() : val(0), next(nu 阅读全文
posted @ 2021-09-17 16:09 ADRUI 阅读(36) 评论(0) 推荐(0) 编辑
摘要: 11 中等 Solution 用i, j(i < j)表示选取的两条线位置, 则水量为$(j - i)* min(a_j, a_i)$ 我们考虑固定选取的右侧j, 则左侧可选为1...j - 1 设$i \in [1, j - 1]$, 若存在 \(k \in [1, j - 1] \ \& \ k 阅读全文
posted @ 2021-09-16 16:18 ADRUI 阅读(29) 评论(0) 推荐(0) 编辑
摘要: 6 中等 Soluion 模拟规律题 找同一行相邻两个字符再原字符串中的间隔 Sample Code (map) class Solution { public: string convert(string s, int numRows) { if(numRows == 1) return s; s 阅读全文
posted @ 2021-09-15 10:03 ADRUI 阅读(36) 评论(0) 推荐(0) 编辑
摘要: Motivation 近两年没怎么刷题 研二实践教学,目前任务还算轻松 打算整点时间把LeetCode刷一遍,保持手感 题解形式: 代码 + 口胡(活多的话各位就将就着看) 尽量一天5道题, 就按序来 工作日更新,也调整下目前懒散的学习状态 从csdn移到博客园 旧址:https://blog.cs 阅读全文
posted @ 2021-09-15 09:16 ADRUI 阅读(12) 评论(0) 推荐(0) 编辑
摘要: 1 简单 Soluion map 排序 + 双指针 Sample Code (map) class Solution { public: map<int, int> mp; map<int, int> pos; vector<int> twoSum(vector<int>& nums, int ta 阅读全文
posted @ 2021-09-14 17:01 ADRUI 阅读(29) 评论(0) 推荐(0) 编辑
摘要: 搬家 阅读全文
posted @ 2021-09-14 16:54 ADRUI 阅读(6) 评论(0) 推荐(0) 编辑
摘要: 近期学了点web,发现还是不能为了学而学 学习的目的在于解决问题, 更多时候, 要根据问题来学习 MVC模式一知半解, JAVA SE的知识不扎实, JDBC还不熟悉, 就想着学框架了... 虽然是因为要赶项目进度的缘故... 还是要脚踏实地的, 才能走得更远 下一阶段学习规划 1. J2SE基础 阅读全文
posted @ 2017-06-29 20:30 ADRUI 阅读(355) 评论(0) 推荐(0) 编辑
摘要: 链接: http://blog.csdn.net/hguisu/article/details/7418161 阅读全文
posted @ 2017-06-01 20:07 ADRUI 阅读(95) 评论(0) 推荐(0) 编辑