Leetcode Biweekly Contest 34

in #wherein6 years ago

I have recently started to attend the online coding contest. Leetcode has held weekly contests on Sunday early mornings - which isn't ideal for coders living in Europe.

However, they have biweekly contests, which is run the Sat 3:30 to 5:30 (BST) every two weeks.

Today's contest: https://leetcode.com/contest/biweekly-contest-34

I have managed to solve 3 puzzles in 90 minutes, however, failed to solve the third puzzle (medium level)

The programming language I choose is C++. I have quite many wrong answers or Time Limit Exceeded - which adds a lot of time penalization to the final result.

image.png

image.png

Matrix Diagonal Sum

https://leetcode.com/contest/biweekly-contest-34/problems/matrix-diagonal-sum
Easy: Too Loops - but to skip the same cell.

Number of Ways to Split a String

Number of Ways to Split a String
Medium: Group by '1's, count if the total divisible by three. Then multiply each possibilities in each 1 groups.

Shortest Subarray to be Removed to Make Array Sorted

https://leetcode.com/contest/biweekly-contest-34/problems/shortest-subarray-to-be-removed-to-make-array-sorted
Medium: Two Pointers? check both sides and the one in the middle

Count All Possible Routes

https://leetcode.com/contest/biweekly-contest-34/problems/count-all-possible-routes
Difficulty: Depth First Search + Memoization


Follow me for topics of Algorithms, Blockchain and Cloud.
I am @justyy - a Steem Witness
https://steemyy.com

Steem 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



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

Coin Marketplace

STEEM 0.04
TRX 0.32
JST 0.089
BTC 59894.30
ETH 1581.19
USDT 1.00
SBD 0.42