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 collections import defaultdict | |
| from typing import DefaultDict, Generic, Iterator, Optional, TypeVar | |
| T = TypeVar("T") | |
| class Node(Generic[T]): | |
| __slots__ = ("data", "bottom") | |
| def __init__(self, value : T, bottom: Optional["Node[T]"] = None) -> None: |
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
| package viikko5; | |
| import java.util.Objects; | |
| public final class Fraction implements Comparable<Fraction> { | |
| public static final Fraction ZERO = new Fraction(0); | |
| private final long numerator; | |
| private final long denominator; |
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
| package viikko4; | |
| // https://github.com/coderodde/DiscreteRandomVariables.java | |
| import io.github.coderodde.prob.randomvariables.support.BinomialDistribution; | |
| import io.github.coderodde.prob.randomvariables.support.PoissonDistribution; | |
| import java.math.BigDecimal; | |
| import java.math.RoundingMode; | |
| public class Tehtavat4 { |
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
| # ETC (Critter & Guitari) mode - Python 2.7 | |
| import os | |
| import glob | |
| import math | |
| import pygame | |
| i = 0 | |
| images = [] |
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
| package io.github.coderodde.encoding; | |
| import java.util.BitSet; | |
| /** | |
| * This class implements a <b>binary</b> code word in data compression | |
| * scenarios. | |
| * | |
| * @author Rodion "rodde" Efremov | |
| * @version 1.0.0 (Oct 28, 2025) |
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
| package io.github.coderodde.compression; | |
| import java.util.BitSet; | |
| /** | |
| * This class implements a <b>binary</b> code word in data compression | |
| * scenarios. | |
| * | |
| * @author Rodion "rodde" Efremov | |
| * @version 1.0.0 (Oct 28, 2025) |
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
| package io.github.coderodde.compression; | |
| import java.util.BitSet; | |
| /** | |
| * This class implements a <b>binary</b> code word in data compression | |
| * scenarios. | |
| * | |
| * @author Rodion "rodde" Efremov | |
| * @version 1.0.0 (Oct 28, 2025) |
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 <stdbool.h> | |
| #include <stdio.h> | |
| #include <stdlib.h> | |
| typedef struct list_node_t { | |
| int datum; | |
| struct list_node_t* next; | |
| } list_node_t; | |
| typedef struct list_t { |
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>Letter permutations</title> | |
| <meta charset="UTF-8"> | |
| <meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
| </head> | |
| <body> | |
| <script> | |
| const str = "ABCDEFGH"; |
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
| package io.github.coderodde.physics.mechanics.rotation; | |
| import java.math.BigInteger; | |
| /** | |
| * This class computes some rotational energies of {@code n}-dimensional, solid, | |
| * equidense balls. | |
| * | |
| * @version 1.1.0 (Jul 14, 2025) | |
| * @since 1.0.0 (Jul 13, 2025) |
NewerOlder