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
type Matrix = list[list[int]] | |
""" | |
This class is responsible for generating snail matrices of dimensions n * n. | |
""" | |
class SnailMatrixGenerator: | |
""" | |
Constructs this generator. | |
""" |
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
namespace CR.PriorityQueues | |
{ | |
class CoderoddeBinaryHeap<TElement, TPriority> : PriorityQueue<TElement, TPriority> | |
where TElement : notnull | |
where TPriority : notnull | |
{ | |
private static readonly int INITIAL_CAPACITY = 16; | |
private class HeapNode<Element, Priority> where Element : notnull where Priority : notnull | |
{ |
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
public class ArrayContraction { | |
public static void main(String[] args) { | |
Array a = new Array(2, 3); | |
System.out.println("Add"); | |
for (int i = 0; i < 8; i++) { | |
System.out.println(a); | |
a.add(); | |
} |
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 itertools import combinations | |
import time | |
def millis(): | |
return round(1000 * time.time()) | |
def powerset(iterable): | |
s = list(iterable) |
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
int, double (ret_int, ret_double) my_foo(a, b, c): | |
if specified a: | |
print "a" | |
if specified b: | |
print "b" | |
if specified c: | |
print "c" | |
if is_requested ret_int: | |
print "int on return requested" | |
if is_requested ret_double: |
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
# ... | |
alias ds='source ds.sh' | |
# ... |
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 java.util.ArrayDeque; | |
import java.util.ArrayList; | |
import java.util.Deque; | |
import java.util.List; | |
public class MultiplePermuter<T> { | |
private final List<List<T>> data; | |
private final Deque<Integer> indexStack; | |
private final List<List<List<T>>> result; | |
private final int numberOfGroups; |
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
Design and Analysis of Algorithms - 5 / 5 | |
Distributed Systems - 5 / 10 | |
Introduction to Machine Learning - 5 / 15 | |
Master's thesis - 30 / 45 TODO | |
CSC - 5 / 50 TODO | |
String processing algorithms - 5 / 55 | |
Data Compression Techniques - 5 / 60 | |
Seminar on Tractability - 3 / 63 | |
Seminar on Combinatorial Pattern Matching - 3 / 66 | |
Tiedon louhinta - 5 / 71 |
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 java.util.ArrayDeque; | |
import java.util.ArrayList; | |
import java.util.Deque; | |
import java.util.List; | |
class RegexParserResearch { | |
public static Deque<Token> shuntingYardAlgorithm(String regex) { | |
List<Token> tokens = tokenize(regex); | |
Deque<Token> output = new ArrayDeque<>(); |
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
#include <windows.h> | |
#include <stdio.h> | |
#define MAX(X, Y) (((X) < (Y)) ? (Y) : (X)) | |
int main() { | |
ULONGLONG ta = GetTickCount64(); | |
ULONGLONG maximumDuration = 0; |
NewerOlder