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
// Program for heap sort in ascending order | |
// 6/10/2019 | |
// Binary heap sort algorithm | |
// Min heap, ascending sort | |
class HeapSort { | |
// Accepts an Array, Unsorted (or sorted - ezpz) | |
constructor(arr) { | |
this.heap = [...arr]; |
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
class Player { | |
constructor(deck) { | |
this.deck = deck; | |
this.winningPile = []; | |
} | |
playCard() { | |
return this.deck.pop(); | |
} |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
/* | |
* Infinite Scroll using Remix Run | |
* Based on client-side Scroll position | |
* Full Article here: https://dev.to/ptenteromano/infinite-scroll-with-remix-run-1g7 | |
*/ | |
import { useEffect, useState, useCallback } from "react"; | |
import { LoaderFunction, useLoaderData, useFetcher } from "remix"; | |
import { fetchPhotos } from "~/utils/api/restful"; | |
import type { PhotoHash } from "~/utils/api/types"; |