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 com.github.coderodde.util; | |
| import java.util.Arrays; | |
| import java.util.Random; | |
| public final class Heapsort { | |
| public static void sort(int[] array) { | |
| if (array.length < 2) { | |
| return; |
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 <iostream> | |
| #include <chrono> | |
| #include <random> | |
| #include <iomanip> | |
| #include <cstring> | |
| // coderodde's mergesort: | |
| void coderodde_merge(int* source_array, int* target_array, int source_offset, int target_offset, int left_run_length, int right_run_length) { | |
| int target_index = target_offset; | |
| int left_index = source_offset; |
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
| Computer\HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Command Processor\Autorun <- DOSKEY /MACROFILE="C:\Users\rodio\setup.doskey" |
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
| 0.02980 3224 | |
| 0.03970 2354 | |
| 0.06940 2340 | |
| 0.07930 3074 | |
| 0.08920 3525 | |
| 0.09910 2074 | |
| 0.11890 3494 | |
| 0.12880 3266 | |
| 0.13870 2216 | |
| 0.16840 2908 |
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
| #ifdef _WIN32 | |
| // Otherwise, Visual Studio (2022) complains about scanf. | |
| #define _CRT_SECURE_NO_WARNINGS | |
| #endif // _WIN32 | |
| #include <stdio.h> | |
| #include <stdbool.h> | |
| #include <stdlib.h> | |
| #include <time.h> | |
| #include <wchar.h> |
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.math.BigDecimal; | |
| public class ArithmeticSchemeValidator { | |
| private static final int MAX_D = 200; | |
| private static final int MAX_M = 200; | |
| private static final int MAX_N = 1_000; | |
| public static int getC(int n, int m, int d) { | |
| int y = myCeil(n, m, d); |
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
| #ifdef _WIN32 | |
| #define _CRT_SECURE_NO_WARNINGS | |
| #endif // _WIN32 | |
| #include <stdio.h> | |
| #include <stdbool.h> | |
| #include <stdlib.h> | |
| #include <time.h> | |
| #define HEIGHT 3 |
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
| 0.01990 2815 | |
| 0.04960 4517 | |
| 0.05950 2848 | |
| 0.09910 2173 | |
| 0.10900 2975 | |
| 0.14860 2232 | |
| 0.24760 2350 | |
| 0.27730 2111 | |
| 0.33670 1623 | |
| 0.35650 1368 |
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> | |
| #ifdef _WIN32 | |
| #include <Windows.h> | |
| #else | |
| #include <pthread.h> | |
| #include <sys/time.h> | |
| #include <unistd.h> | |
| #endif |
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 com.github.coderodde; | |
| import java.math.BigInteger; | |
| import java.util.ArrayList; | |
| import java.util.Arrays; | |
| import java.util.Collections; | |
| import java.util.List; | |
| public class FingersToEntropy { | |