New Snippet
Explore
Create Account
Login
Explore
Create Account
Login
New Snippet

@bdal's Snippets

what-gpt-says-is-the-most-efficient

/**
 * Find the largest palindrome made from the product of two 3-digit numbers
 *
 * This optimized solution uses mathematical properties of palindromes to narrow
 * the search space and employs early termination strategies to reduce iterations.
Modified 2w ago
|
Created 3w ago

largest-palindrome-product-for-three-digits

/**
 * Find the largest palindrome made from the product of two 3-digit numbers
 *
 * This solution works by starting from the largest possible 3-digit numbers (999)
 * and decrementing to efficiently find the largest palindrome. This approach
Modified 2w ago
|
Created 2w ago

Finding the difference between the sum of squares and the square of the sum

/**
 * Finding the difference between the sum of squares and the square of the sum
 * -------------------------------------------------------------------------
 * 
 * The sum of the squares of the first ten natural numbers is:
Modified 3w ago
|
Created 3w ago

smallest-divisible-challenge.ts

/*
 * 2520 is the smallest number that can be divided by each 
 * of the numbers from 1 to 10 without any remainder.
 * 
 * What is the smallest positive number that is evenly 
Modified 3w ago
|
Created 3w ago

Binary Search

/**
 * Binary search algorithm: https://en.wikipedia.org/wiki/Binary_search_algorithm
 * Will return the index of the 'searchValue' or -1 if not found.
 */
const binarySearch = (searchValue, array) => {
Modified 3w ago
|
Created 3w ago

Explore

|

Create Account

|

Login

|

Donate

Privacy Policy

|

Terms & Conditions

|

Copyright © 2018-2022 Staymark Group LLC