Skip to content
  • HOME
  • main page
  • Discussion
  • History
  • View source
  • Community Portal
  • BLOGExpand
    • I/O
    • Math
    • Time
    • Sort algorithms
  • Time

    Calculate the Number of Days Between Two Dates

    Byahotnjok June 22, 2026June 22, 2026

    Calculate the Number of Days Between Two Dates — CodeForge CodeForge — Programming Reference Calculate the Number of Days Between Two Dates 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…

    Read More Calculate the Number of Days Between Two DatesContinue

  • Time

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

    Byahotnjok June 22, 2026June 22, 2026

    Find the Number of Minutes in a HH:MM:SS Time String — CodeForge CodeForge — Programming Reference Find the Number of Minutes in a HH:MM:SS Time String 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….

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

  • Time

    Format a Date for Inserting into a MySQL Database

    Byahotnjok June 22, 2026June 22, 2026

    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

  • I/O

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

    Byahotnjok June 22, 2026June 22, 2026

    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

  • I/O

    A question that looks trivial until symbolic links, sparse files

    Byahotnjok June 22, 2026June 22, 2026

    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

  • I/O

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

    Byahotnjok June 22, 2026June 22, 2026

    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

  • Sort algorithms

    Split until trivial merge back in order 

    Byahotnjok June 22, 2026June 22, 2026

    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

  • Sort algorithms

    The slowest sort most programmers learn first 

    Byahotnjok June 22, 2026June 22, 2026

    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

  • Sort algorithms

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

    Byahotnjok June 22, 2026June 22, 2026

    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

  • Math

    Calculate a Triangle Number

    Byahotnjok June 22, 2026June 22, 2026

    Calculate a Triangle Number — CodeCodex Math Calculate a Triangle Number 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…

    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