Skip to content
CodeCodex
  • HOME
  • main page
  • Discussion
  • History
  • View source
  • Community Portal
  • BLOGExpand
    • I/O
    • Math
    • Time
    • Sort algorithms
CodeCodex
  • Calculate the Number of Days Between Two Dates
    Time

    Calculate the Number of Days Between Two Dates

    Byahotnjok 2026-06-222026-07-14

    Calculate the Number of Days Between Two Dates — CodeForge CodeForge — Programming Reference Subtracting two calendar dates looks like simple arithmetic until leap years, time zones, and daylight saving transitions all quietly disagree about how long a day actually is. Difficulty: Beginner–Intermediate Languages: Python · Java · JavaScript Read: ~9 min In this article…

    Read More Calculate the Number of Days Between Two DatesContinue

  • Find the Number of Minutes in a HH:MM:SS Time String
    Time

    Find the Number of Minutes in a HH:MM:SS Time String

    Byahotnjok 2026-06-222026-07-14

    Find the Number of Minutes in a HH:MM:SS Time String — CodeForge CodeForge — Programming Reference Splitting a duration string into its parts and turning it back into a single number — and the rounding decision that quietly changes what “number of minutes” even means. Difficulty: Beginner Languages: Python · JavaScript · Java Read: ~8…

    Read More Find the Number of Minutes in a HH:MM:SS Time StringContinue

  • Format a Date for Inserting into a MySQL Database
    Time

    Format a Date for Inserting into a MySQL Database

    Byahotnjok 2026-06-222026-07-14

    Append a String to a File — CodeForge CodeForge — Programming Reference Append a String to a File Adding text to the end of a file without disturbing what’s already there — the open mode that matters, and why concurrent appends need more care than they look like they do. Difficulty: Beginner Languages: Python ·…

    Read More Format a Date for Inserting into a MySQL DatabaseContinue

  • Adding text to the end of a file without disturbing what’s already there
    I/O

    Adding text to the end of a file without disturbing what’s already there

    Byahotnjok 2026-06-222026-07-14

    Append a String to a File — CodeForge CodeForge — Programming Reference Append a String to a File Adding text to the end of a file without disturbing what’s already there — the open mode that matters, and why concurrent appends need more care than they look like they do. Difficulty: Beginner Languages: Python ·…

    Read More Adding text to the end of a file without disturbing what’s already thereContinue

  • A question that looks trivial until symbolic links, sparse files
    I/O

    A question that looks trivial until symbolic links, sparse files

    Byahotnjok 2026-06-222026-07-14

    Determine the Size of a File — CodeForge CodeForge — Programming Reference Determine the Size of a File A question that looks trivial until symbolic links, sparse files, and streamed sources show up — three ways to ask “how big is this,” and what each answer actually means. Difficulty: Beginner Languages: Python · Java ·…

    Read More A question that looks trivial until symbolic links, sparse filesContinue

  • Reading from a socket or a file handle that might just never respond
    I/O

    Reading from a socket or a file handle that might just never respond

    Byahotnjok 2026-06-222026-07-14

    I/O With Timeout — CodeForge CodeForge — Programming Reference I/O With Timeout Reading from a socket or a file handle that might just never respond — and the patterns that stop a hung connection from hanging your entire program. Difficulty: Intermediate Languages: Python · C · Java Read: ~10 min In this article Why blocking…

    Read More Reading from a socket or a file handle that might just never respondContinue

  • Split until trivial merge back in order 
    Sort algorithms

    Split until trivial merge back in order 

    Byahotnjok 2026-06-222026-07-14

    Merge Sort — CodeForge CodeForge — Programming Reference Merge Sort Split until trivial, merge back in order — the divide-and-conquer sort with a guaranteed O(n log n) ceiling and no nasty worst case hiding underneath it. Difficulty: Intermediate Languages: Python · Java · OCaml Read: ~10 min In this article The core idea: divide, sort…

    Read More Split until trivial merge back in order Continue

  • The slowest sort most programmers learn first 
    Sort algorithms

    The slowest sort most programmers learn first 

    Byahotnjok 2026-06-222026-07-14

    Bubble Sort — CodeCodex Sort Algorithms Bubble Sort The slowest sort most programmers learn first — and exactly because of that, the clearest possible introduction to what “comparing and swapping” even means. Difficulty: Beginner Languages: Python · Java · C Read: ~9 min In this article The core idea: repeated neighbor swaps Why it’s called…

    Read More The slowest sort most programmers learn first Continue

  • The divide-and-conquer sort that’s fast on average, fragile in the worst case
    Sort algorithms

    The divide-and-conquer sort that’s fast on average, fragile in the worst case

    Byahotnjok 2026-06-222026-07-14

    Quicksort — CodeCodex Sort Algorithms Quicksort The divide-and-conquer sort that’s fast on average, fragile in the worst case, and still the default choice behind most general-purpose sort functions in use today. Difficulty: Intermediate Languages: C · Python · Java Read: ~10 min In this article The core idea: partition, then conquer Choosing a pivot —…

    Read More The divide-and-conquer sort that’s fast on average, fragile in the worst caseContinue

  • Calculate a Triangle Number
    Math

    Calculate a Triangle Number

    Byahotnjok 2026-06-222026-07-14

    Calculate a Triangle Number — CodeCodex Math The sum of the first n integers, the shape that gives it its name, and the one-line formula that replaces an entire loop. Difficulty: Beginner Languages: Python · JavaScript · Pascal Read: ~8 min In this article What a triangle number is, visually and numerically The loop-based approach…

    Read More Calculate a Triangle NumberContinue

Page navigation

1 2 Next PageNext
CodeCodex Footer
CodeCodex

CodeCodex is a free, open, wiki-powered code repository covering 40+ programming languages. Find ready-to-use algorithms, snippets, and functions — written and improved by developers around the world every day.

Categories

  • Sorting Algorithms
  • Input / Output
  • Math & Algorithms
  • Time & Dates

Company

  • Home
  • Community
  • Blog

Legal

  • Privacy Policy
  • Disclaimer
© 2025 CodeCodex. All rights reserved. Free and open for everyone.
Privacy Policy Disclaimer Sorting Algorithms
  • HOME
  • main page
  • Discussion
  • History
  • View source
  • Community Portal
  • BLOG
    • I/O
    • Math
    • Time
    • Sort algorithms