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
__author__ = 'arefaey' | |
def rotate(image_matrix): | |
result = [] | |
n = len(image_matrix) | |
for i in range(n): | |
new_row = [] | |
for j in range(n): | |
new_row.append(image_matrix[n - j - 1][i]) |
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
__author__ = 'arefaey' | |
def list_equilibrium(l): | |
s = sum(l) | |
right_sum = s | |
left_sum = 0 | |
for i in range(len(l)): | |
elem = l[i] | |
right_sum = right_sum - elem |
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
package main | |
import ( | |
"bufio" | |
"fmt" | |
"net" | |
"os" | |
) | |
func main() { |