2022年12月5日
摘要:
#include <vector> #include <iostream> using namespace std; class Solution { public: int trap(vector<int>& height) { int len=height.size(); //当前位置左边界最大
阅读全文
posted @ 2022-12-05 21:36
一仟零一夜丶
阅读(62)
推荐(0)
摘要:
#include <vector> #include <iostream> using namespace std; class Solution { public: Solution(){} ~Solution(){} int firstMissingPositive(vector<int>& n
阅读全文
posted @ 2022-12-05 16:45
一仟零一夜丶
阅读(16)
推荐(0)
2022年12月2日
摘要:
#include <vector> #include <iostream> #include <string.h> using namespace std; class Solution { public: Solution(){} ~Solution(){} bool isValidSudoku(
阅读全文
posted @ 2022-12-02 17:22
一仟零一夜丶
阅读(15)
推荐(0)
2022年12月1日
摘要:
#include <vector> #include <iostream> using namespace std; class Solution { public: Solution(){} ~Solution(){} double findMedianSortedArrays(vector<in
阅读全文
posted @ 2022-12-01 20:43
一仟零一夜丶
阅读(22)
推荐(0)
2022年11月28日
摘要:
Java回溯版(超时) package leetcode; import java.util.ArrayList; import java.util.Arrays; import java.util.List; public class demo_18 { public List<List<Inte
阅读全文
posted @ 2022-11-28 20:33
一仟零一夜丶
阅读(14)
推荐(0)
摘要:
#include <vector> #include <unordered_set> #include <string> #include <iostream> using namespace std; class Solution { public: Solution(){} ~Solution(
阅读全文
posted @ 2022-11-28 17:39
一仟零一夜丶
阅读(23)
推荐(0)
2022年11月27日
摘要:
#include <vector> #include <algorithm> #include <iostream> #include <cmath> #include <unordered_map> using namespace std; class Solution { public: Sol
阅读全文
posted @ 2022-11-27 17:31
一仟零一夜丶
阅读(17)
推荐(0)
2022年11月26日
摘要:
#include <vector> #include <iostream> using namespace std; class Solution { public: int maxProfit(vector<int>& prices) { int len=prices.size(); int dp
阅读全文
posted @ 2022-11-26 17:15
一仟零一夜丶
阅读(13)
推荐(0)
2022年5月17日
摘要:
package leetcode; import java.util.HashMap; public class demo_106 { public TreeNode buildTree(int[] inorder, int[] postorder) { HashMap<Integer, Integ
阅读全文
posted @ 2022-05-17 10:16
一仟零一夜丶
阅读(14)
推荐(0)
2022年5月16日
摘要:
package leetcode; class Trie { private Trie[] children; //当前节点是否为一个单词的结尾 private boolean isEnd; public Trie() { //每个节点最多有26个字母 children=new Trie[26];
阅读全文
posted @ 2022-05-16 11:25
一仟零一夜丶
阅读(40)
推荐(0)