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 <string.h> | |
| #define MAX(a, b) ((a) > (b) ? (a) : (b)) | |
| #define MAX_RECORD_TOKEN_LENGTH 64 | |
| #define MAX_RECORD_TOKEN_LENGTH_STRING "64" | |
| #define TELEPHONE_RECORD_BOOK_FILE_NAME ".telephone_book" | |
| static const char* TITLE_LAST_NAME = "Last name"; |
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 "mergesort.h" | |
| #include <algorithm> | |
| #include <chrono> | |
| #include <cstdint> | |
| #include <iostream> | |
| #include <random> | |
| #include <vector> | |
| using std::boolalpha; | |
| using std::copy; |
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.ArrayList; | |
| import java.util.List; | |
| import net.coderodde.graph.pathfinding.uniform.delayed.AbstractNodeExpander; | |
| public class BackwardDigraphNodeExpander | |
| extends AbstractNodeExpander<DigraphNode> { | |
| @Override | |
| public List<DigraphNode> expand(DigraphNode node) { |
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 "stable_sort.h" | |
| #include <limits.h> | |
| #include <stdbool.h> | |
| #include <stdlib.h> | |
| #include <stdio.h> | |
| #include <string.h> | |
| typedef struct run_length_queue | |
| { | |
| size_t* storage; |
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
| function fuckyeah_bling(fuckyeah_text_element) { | |
| var black = true; | |
| function fuckyeah_bling_func() { | |
| var colors = ["red", "orange", "yellow", "green", "blue", "violet"]; | |
| var index = Math.floor(Math.random() * 6); | |
| fuckyeah_text_element.style.color = colors[index]; | |
| fuckyeah_text_element.style.backgroundColor = black ? "black" : "white"; | |
| black = !black; |
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 net.coderodde.util; | |
| import java.util.ArrayDeque; | |
| import java.util.Deque; | |
| import java.util.HashMap; | |
| import java.util.Map; | |
| import java.util.NoSuchElementException; | |
| import java.util.Objects; | |
| import java.util.PriorityQueue; | |
| import java.util.Random; |
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 net.coderodde.util; | |
| /** | |
| * This class contains static utility methods for dealing with matrices of | |
| * {@code double} values. | |
| * | |
| * @author Rodion "rodde" Efremov | |
| * @version 1.6 | |
| */ | |
| public class MatrixUtils { |
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
| /****************** | |
| * File: execres.c * | |
| ******************/ | |
| #include "execres.h" | |
| #include <stdlib.h> | |
| PExecResult execTime( void* (*code)( void*), void* param ){ | |
| PExecResult result = (PExecResult) malloc( sizeof(ExecResult) ); |
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; | |
| import java.math.RoundingMode; | |
| import java.util.ArrayDeque; | |
| import java.util.Queue; | |
| import java.util.Random; | |
| public class MovingAverageV2 { | |
| private final Queue<BigDecimal> window = new ArrayDeque<>(); | |
| private final int period; |
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 time import clock | |
| def sylvester_number_original(n): | |
| if n == 0: | |
| return 2 | |
| return sylvester_number_original(n - 1) * (sylvester_number_original(n - 1) - 1) + 1 |