This file contains hidden or 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 numpy import * | |
n = int(input()) | |
A = [list(map(int, input().split())) for i in range(n)] | |
A = array(A) | |
z = A.copy() | |
b = n | |
f = 0 | |
while n > 2: | |
k = f | |
for i in range(f, n - 1): |
This file contains hidden or 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 decToBin(number, base, precision): | |
number = str(number) | |
integerPart = int( number[ : number.index(".") ] ) | |
fractionalPart = float( number[ number.index(".") : ] ) | |
output = "" | |
while integerPart != 0: | |
output = str( integerPart % base ) + output | |
integerPart //= base |
This file contains hidden or 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
s = 4 | |
for i in range(5): | |
for j in range(s): | |
print(" ", end = "") | |
for j in range(i): | |
print("*", end = "") | |
for j in range(i-1): | |
print("*", end = "") | |
print("") | |
s -= 1 |
This file contains hidden or 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
import java.util.Random; | |
import java.util.Arrays; | |
class SpeedTest { | |
public static void selectionSort(int arr[]) { | |
int i, j, t, minIndex, len = arr.length; | |
for(i=0; i<len-1; i++) { | |
minIndex = i; | |
for(j=i+1; j<len; j++) |
This file contains hidden or 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
#include <stdio.h> | |
#include <stdlib.h> | |
#include <time.h> | |
void selectionSort(int *arr, int len) { | |
int i, j, t, minIndex; | |
for(i=0; i<len-1; i++) { | |
minIndex = i; | |
for(j=i+1; j<len; j++) | |
if(*(arr + j) < *(arr + minIndex)) |
This file contains hidden or 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
<!DOCTYPE HTML> | |
<html> | |
<head> | |
<title> | |
HTML Basics | |
</title> | |
<style> | |
main { | |
padding: 20px; |
This file contains hidden or 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
#include <stdio.h> | |
int isDivisible(int num) { | |
for(int i = 20; i >= 1; i--) | |
if(num % i != 0) | |
return 0; | |
return 1; | |
} | |
int main() { |