Leetcode 双周赛34 简要回顾
我最近开始参加leetcode在线编程竞赛。 Leetcode在周日的清晨举行每周一次的比赛-但是我在英国,比赛的时间在凌晨,起不来比赛,嗯,睡觉更重要。
还好,每两周有一次双周赛,时间是周六下午 3:30到5:30(BST)。
今天的比赛:https://leetcode.com/contest/biweekly-contest-34
我在90分钟内成功解决了3题,但是未能解决第三题(难度中)
我选择的编程语言是C ++。 提交了很多次是超时或者是错误答案WA,所以罚时很多。
![](https://assets.matters.news/embed/e5fa58f7-0ea2-4795-a0b8-1e0f0eacdf16.png)
![](https://assets.matters.news/embed/bf26a5f0-2b4b-4106-a343-4aaf06e0568f.png)
Matrix Diagonal Sum
https://leetcode.com/contest/biweekly-contest-34/problems/matrix-diagonal-sum
简单难度 - 两个循环,注意别重复加和。
Number of Ways to Split a String
Number of Ways to Split a String
难度中:按1来分组,然后每组可能性相乘。
Shortest Subarray to be Removed to Make Array Sorted
难度中:双指针?两边删和中间删判断一下。
Count All Possible Routes
https://leetcode.com/contest/biweekly-contest-34/problems/count-all-possible-routes
难: Depth First Search + Memoization 深度优先+记忆
Follow me for topics of Algorithms, Blockchain and Cloud.
I am @justyy - a Steem Witness
Steem/Blurt On!~
Every little helps! I hope this helps!
If you like my work, please consider voting for me or Buy Me a Coffee, thanks!
https://steemit.com/~witnesses type in justyy and click VOTE
![](https://assets.matters.news/embed/d98633be-bafc-43ec-8645-17cef0e5e169.jpeg)
Alternatively, you could proxy to me if you are too lazy to vote!
Also: you can vote me at the tool I made: https://steemyy.com/witness-voting/?witness=justyy