This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
https://www.hackerrank.com/profile/Tusenka |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/python3 | |
import math | |
import os | |
import random | |
import re | |
import sys | |
import copy | |
import pprint |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
What is wrong with the code. Why it writes 5<4? | |
``` | |
#!/bin/python3 | |
import math | |
import os | |
import random | |
import re | |
import sys |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/python3 | |
import math | |
import os | |
import random | |
import re | |
import sys | |
# | |
# Complete the 'gridSearch' function below. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def _iter_swap(m,i,j): | |
for [x, y] in [(i,j), (len(m)-i-1, j), (i, len(m)-j-1), (len(m)-i-1, len(m)-j-1)]: | |
yield m[x][y] | |
def _get_max(m, i, j): | |
return max(_iter_swap(m, i, j)) | |
def _iter_corner(m): |
OlderNewer