Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
from time import perf_counter | |
string_to_check = "Go hang a salami --- --- I'm a lasagna hog." | |
#myCode - | |
def is_palindrome1(p_str): | |
new_str = "" | |
for char in p_str: | |
if char.isalpha(): | |
new_str += char.lower() |
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
from math import sqrt | |
from time import perf_counter | |
lst = [] | |
#myCode - | |
def getPF1(n): | |
if n <= 1: | |
return | |
elif n == 2 : |
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
//matrix size -> n*m | |
int findMine(i, j){ | |
if(i < 0 || i > n){ | |
return -1; | |
} | |
if(j == (m-1)){ | |
return arr[i][j]; | |
} | |
if(mem[i][j] == -1){ |