LeetCode Weekly Contest Results
30 Sep 2017
|
Solutions
LeetCode
52: 2017-09-30: Rank 681/2615, 8 points;
- (686. Repeated String Match ): 0:54:04, 2 error;
- (687. Longest Univalue Path ): 1:19:55, 3 error;
53: 2017-10-07: Rank 261/2392, 15 points;
- (693. Binary Number with Alternating Bits ): 0:06:05, 1 error;
- (695. Max Area of Island ): 0:16:06, 0 error;
- (694. Number of Distinct Islands ): 0:44:05, 0 error;
- (691. Stickers to Spell Word ): A integer-programming problem, but with no idea how to do that…
54: 2017-10-14: Rank 266/3232, 15 points;
- (697. Degree of an Array ): 0:37:35, 0 error;
- (696. Count Binary Substrings ): 0:50:08, 0 error;
- (698. Partition to K Equal Sum Subsets ): DFS, TLE; changed the
void
function to bool
, AC; 0:57:41, 3 error;
- (699. Falling Squares ):
unordered_map<int, int>
TLE; Need to try with priority_queue
;
55: 2017-10-21: Rank 173/3036, 18 points;
- (714. Best Time to Buy and Sell Stock with Transaction Fee ): DP; 0:23:04, 0 error;
- (712. Minimum ASCII Delete Sum for Two Strings ): DP; 1:23:16, 2 WA;
- (713. Subarray Product Less Than K ): DP; 0:48:06, 1 WA;
- (715. Range Module ): No time left.
56: 2017-10-28: Rank 165/2655, 22 points;
- (717. 1-bit and 2-bit Characters ): dfs; 0:27:06;
- (443. String Compression ): simple iteration; 0:21:19, 3 WA;
- (718. Maximum Length of Repeated Subarray ): DP; 0:58:15, 1 TLE, 1 OLE, 4 WA;
- (719. Find K-th Smallest Pair Distance ): binary search in the solution space; 0:40:07, 1 WA;
57: 2017-11-04: Rank 433/2719, 4 points;
- (720. Longest Word in Dictionary ): dfs; 0:9:31;
- (721. Accounts Merge ): hhhhhh (Tried to learn UnionSet by this problem, so no time for other problems). UnionSet, 3 WA, 1 TLE;
58: 2017-11-11: Rank 387/2514, 16 points;
- (724. Find Pivot Index ): presum; 0:28:06; (Because of Technical error of leetcode…A lasting 500 error)…
- (725. Split Linked List in Parts ): brute force; 0:43:51;
- (726. Number of Atoms ): stack; 1:33:49;
- (727. Minimum Window Subsequence ): sliding window, but this problem require an ordered element… so WA; tried brute force, but TLE;