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-30
I have managed to solve 3 puzzles in 30 minutes, however, failed to solve the fourth puzzle (difficulty level) in next hour.
The programming language I choose is Python, C++. I have 1 Wrong Answer submission for Problem 3 - which adds total 10 minutes time penalization.
The fourth puzzle is not that difficult - it is a pity that I didn’t get it - and my ranking is expected to drop.
Reformat Date
https://leetcode.com/contest/biweekly-contest-30/problems/reformat-date/
It is harder to use C++ as in C++ the string split function is not native. Python is good.
Range Sum of Sorted Subarray Sums
https://leetcode.com/contest/biweekly-contest-30/problems/range-sum-of-sorted-subarray-sums/
O(N^2) will work - as the input range is (10^3), however beware of the integer overflow.
Minimum Difference Between Largest and Smallest Value in Three Moves
https://leetcode.com/contest/biweekly-contest-30/problems/minimum-difference-between-largest-and-smallest-value-in-three-moves/
Sorting (O(N^LogN)) and then compare four different possibilities.
Stone Game IV
https://leetcode.com/contest/biweekly-contest-30/problems/stone-game-iv/
Dynamic Programming, similar to this puzzle
I’ll share the solutions on the blog in more details soon.
Although the contest has ended, you can try to participate on the virtual contest.
Every little helps! I hope this helps!
Steem On!~
If you like my work, please consider voting for me, 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
Visit me at: https://steemyy.com
This page is synchronized from the post: ‘Leetcode Biweekly Contest 30’