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
# coding=utf-8 | |
import random | |
n = 10 | |
A = [random.randint(0, 10) for i in range(0, n)] | |
def partition(array, start, end): | |
pivot = array[(start + end) // 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
import random | |
def merge_sort(a): | |
n = len(a) | |
if n < 2: | |
return a | |
l = merge_sort(a[:n//2]) | |
r = merge_sort(a[n//2:n]) |
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
#!/usr/bin/python3 | |
import socket | |
import struct | |
import json | |
import time | |
class StatusPing: | |
""" Get the ping status for the Minecraft server """ |
NewerOlder