Weekly Contest 目前是北京时间每周日上午 10 点半到 12点,目前参加了 9 次。
每周参加weekly contest,发现前几名都会在半小时左右完成4题,我感觉对于一道陌生的MEDIUM题目,理解+思考...
classSolution {public:intdayOfYear(stringdate) { vector<int> days_run = {31,29,31,30,31,30,31,31,30,31,30,31}; vector<int> days_ping = {31,28,31,30,31,30,31,31,30,31,30,31};intyear = -1;intmonth = -1;intday = -1; date.push_back('-');stringstr;for(auto&ch : d...
Given an array of 4 digits, return the largest 24 hour time that can be made. The smallest 24 hour time is 00:00, and the largest is 23:59. Starting from 00:00, a time is larger if more time has elapsed since midnight. Return the answer as a string of length 5. If no valid ...
【leetcode】Weekly Contest 94 题目不难,被第二题卡了半个多小时QAQ,另一个就是以后能用Hashmap和Hashset的绝不遍历。 1. Leaf-Similar Trees dfs、层次遍历把叶子节点遍历然后对比即可,只要是先遍历左节点后遍历右节点就行。 1classSolution {2publicbooleanleafSimilar(TreeNode root1, TreeNode root2) {3...
leetcode weekly contest 316liuyatian 立即播放 打开App,流畅又高清100+个相关视频 更多34 -- 49:09 App leetcode weekly contest 311 380 -- 28:47 App 2024年CSP-S第一题 决斗 101 -- 1:00:22 App Atcoder Regular Contest 147 500 4 16:29:07 App 超全超简单!一口气学完CNN、RNN、GAN、GNN...
LeetCode笔记:Biweekly Contest 90 1. 题目一 给出题目一的试题链接如下: 2451. Odd String Difference 1. 解题思路 这一题的题目难度感觉全在读题上面,看懂了题目基本就是按照题意翻译一下就行。 找到每一个单词的pattern,然后将唯一一个pattern不同string挑选出来返回即可。
https://leetcode-cn.com/contest/weekly-contest-174/ranking/1/ 总体心得 使用python3,做成了第一道题,第二道题的解超时,便结束了第一次周赛。 下午看了排行榜靠前的参赛者代码,最快的在17分钟内就完赛了(使用python3),使用python3的和c++的数量几乎对半分。
16 + * 5271.minimum-time-visiting-all-points 访问所有点的最小时间 17 + 18 + 6 19 --- 7 20 ## 20191118 8 21 * 8.string-to-integer-atoi 字符串转换整数 (atoi) contest/weekly-contest-163/README.md +1-1 Original file line numberDiff line numberDiff line change @@ -...
给你一个字符串 s,找出它的所有子串并按字典序排列,返回排在最后的那个子串。 示例1: 输入:"abab" 输出:"bab" 解释:我们可以找出 7 个子串 ["a", "ab", "aba", "abab", "b", "ba", "bab"]。按字典序排在最后的子串是 "bab"。