26
Last seen 8 years ago
Member for 10 years, 1 month, 6 days
Difficulty Normal
+1 for the comments, I didn't write that because of my poor English..
for a simple case it woud be nicer to use a string method instead of the Re
alphabet = set([x for x in # create a set from the alphabet characters
string.ascii_lowercase]) # in th
More
I rewrite this code in leetcode. It got 80ms accepted, it shoud be fast..
Every time we find a 0, we store the possible numbers we can choice in a dict,
if the possible numbers is only one, we fill the board first and refill the board from beginning,
and last , we choose a position where the poss
More
At first I try to use a bruteforce way to solve this, there are 5**6 permutations, I think it's too slow. I googled this question and got some answers. I noticed the relations below are all the same! I think it may have only just one answer for this question, So I wrote this cheat solution with the
More
for the detail please see [geeksforgeeks](http://www.geeksforgeeks.org/largest-rectangle-under-histogram/)
More