Skip to content

Commit 90d55de

Browse files
committed
Updates
1 parent 0b03ea1 commit 90d55de

11 files changed

+268
-91
lines changed

asset-manifest.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"files": {
33
"main.css": "/static/css/main.e377ecbf.css",
4-
"main.js": "/static/js/main.ce2a7377.js",
4+
"main.js": "/static/js/main.de8844ab.js",
55
"static/js/453.f568ff1d.chunk.js": "/static/js/453.f568ff1d.chunk.js",
66
"static/media/border.jpg": "/static/media/border.b7869a9ea7ccd009873c.jpg",
77
"static/media/parchment.png": "/static/media/parchment.c4af92656f29dc66bd67.png",
@@ -11,11 +11,11 @@
1111
"static/media/slick.woff": "/static/media/slick.295183786cd8a1389865.woff",
1212
"index.html": "/index.html",
1313
"main.e377ecbf.css.map": "/static/css/main.e377ecbf.css.map",
14-
"main.ce2a7377.js.map": "/static/js/main.ce2a7377.js.map",
14+
"main.de8844ab.js.map": "/static/js/main.de8844ab.js.map",
1515
"453.f568ff1d.chunk.js.map": "/static/js/453.f568ff1d.chunk.js.map"
1616
},
1717
"entrypoints": [
1818
"static/css/main.e377ecbf.css",
19-
"static/js/main.ce2a7377.js"
19+
"static/js/main.de8844ab.js"
2020
]
2121
}

index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
<!doctype html><html lang="en" class="dark"><head><meta charset="utf-8"/><link rel="icon" href="/favicon.ico"/><link rel="icon" type="image/svg+xml" href="/favicon.svg"/><meta name="viewport" content="width=device-width,initial-scale=1"/><meta name="theme-color" content="#000000"/><link rel="alternate" type="application/rss+xml" title="Fezcodex RSS Feed" href="/rss.xml"/><meta name="description" content="codex by fezcode..."/><link rel="apple-touch-icon" href="/logo192.png"/><link rel="manifest" href="/manifest.json"/><link rel="preconnect" href="https://fonts.googleapis.com"><link rel="preconnect" href="https://fonts.gstatic.com" crossorigin><link href="https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;700&family=Space+Mono:wght@400;700&display=swap" rel="stylesheet"><link href="https://fonts.googleapis.com/css2?family=Arvo&family=Inter&family=Playfair+Display&display=swap" rel="stylesheet"><title>fezcodex</title><script defer="defer" src="/static/js/main.ce2a7377.js"></script><link href="/static/css/main.e377ecbf.css" rel="stylesheet"></head><body class="bg-slate-950"><noscript>You need to enable JavaScript to run this app.</noscript><div id="root"></div></body></html>
1+
<!doctype html><html lang="en" class="dark"><head><meta charset="utf-8"/><link rel="icon" href="/favicon.ico"/><link rel="icon" type="image/svg+xml" href="/favicon.svg"/><meta name="viewport" content="width=device-width,initial-scale=1"/><meta name="theme-color" content="#000000"/><link rel="alternate" type="application/rss+xml" title="Fezcodex RSS Feed" href="/rss.xml"/><meta name="description" content="codex by fezcode..."/><link rel="apple-touch-icon" href="/logo192.png"/><link rel="manifest" href="/manifest.json"/><link rel="preconnect" href="https://fonts.googleapis.com"><link rel="preconnect" href="https://fonts.gstatic.com" crossorigin><link href="https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;700&family=Space+Mono:wght@400;700&display=swap" rel="stylesheet"><link href="https://fonts.googleapis.com/css2?family=Arvo&family=Inter&family=Playfair+Display&display=swap" rel="stylesheet"><title>fezcodex</title><script defer="defer" src="/static/js/main.de8844ab.js"></script><link href="/static/css/main.e377ecbf.css" rel="stylesheet"></head><body class="bg-slate-950"><noscript>You need to enable JavaScript to run this app.</noscript><div id="root"></div></body></html>

posts/algos/find-minimum-in-rotated-sorted-array.txt

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
# Find Minimum in Rotated Sorted Array
2-
31
## Problem Description
42

53
Suppose an array sorted in ascending order is rotated at some pivot unknown to you beforehand.
@@ -54,4 +52,4 @@ func main() {
5452
fmt.Println(findMin([]int{1, 2})) // Output: 1
5553
fmt.Println(findMin([]int{2, 1})) // Output: 1
5654
}
57-
```
55+
```
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
Oh, to be human! To crave **order**, to meticulously **plan**, to believe that if we just gather enough data, analyze enough variables, we can **predict the future**. What a *glorious, self-deceiving delusion*. Because lurking beneath our carefully constructed narratives of cause and effect, there's a mischievous, undeniable truth: **Chaos Theory**.
2+
3+
And no, I'm not talking about some dry, academic treatise on differential equations. I'm talking about the ***philosophy*** of chaos, the *infuriating, liberating realization* that the universe, and our lives within it, are fundamentally, gloriously, and terrifyingly **unpredictable**.
4+
5+
We cling to the idea that every grand outcome must have an equally grand progenitor. A monumental decision leads to a monumental consequence. But Chaos Theory, in its most poetic form, whispers (or rather, **shouts**) about the "***butterfly effect***." It's the notion, famously articulated by meteorologist Edward Lorenz, that a butterfly flapping its wings in Brazil could, *theoretically*, set off a tornado in Texas. Think about that for a second. A *tiny*, almost imperceptible flutter, a mere breath of air, cascading through an infinitely complex system to **reshape continents**.
6+
7+
How many times have you looked back at a **pivotal moment** in your life and traced its origin not to a grand choice, but to a *forgotten email*, a *chance encounter*, a *delayed train*, or a *spilled cup of coffee*? That job you landed? Maybe it wasn't your stellar resume, but the fact that the hiring manager had a particularly good morning because their cat *didn't* wake them up at 4 AM for once. That relationship that changed everything? Perhaps it began because you took a different route home, avoiding a puddle that would have otherwise sent you down a *completely different path*.
8+
9+
We build our models, our algorithms, our five-year plans, convinced that if we just perfect the inputs, the outputs will be ours to command. But **chaos laughs**. It reminds us that even the *most minute, unmeasurable perturbation* can send the entire system veering off into an entirely new, **unforeseen trajectory**. It's why weather forecasts beyond a few days are *notoriously unreliable*, despite supercomputers churning through quadrillions of calculations. It's why economies crash when a seemingly minor market fluctuation triggers a **cascade of panic**.
10+
11+
And this, my friends, is where the "***rant***" truly begins. Because while our rational minds scream for **control**, for **certainty**, for a predictable narrative, chaos offers *none*. It offers a **beautiful, maddening dance** where every step influences the next in ways we can never fully grasp. It's the *ultimate cosmic prank*, reminding us of our infinitesimal place in a universe that cares not for our spreadsheets or our anxieties.
12+
13+
So, what's the point? To despair? To throw our hands up and surrender to the whims of the universe? Perhaps. Or perhaps, it's to find a *strange, unsettling peace* in the surrender. To embrace the fact that life is less a meticulously crafted blueprint and more a **jazz improvisation** – full of *unexpected notes*, *beautiful accidents*, and moments of pure, unadulterated, **glorious chaos**.
14+
15+
Stop trying to control the wind; **learn to sail**. Stop trying to predict the butterfly; just **marvel at its flight**. Because in the heart of that unpredictability lies the very essence of life's adventure. And maybe, just maybe, that's a **rant worth having**.

posts/kaprekars-routine.txt

Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
Have you ever played with numbers and found a surprising pattern? One such fascinating pattern is hidden within **Kaprekar's Routine**, named after the Indian mathematician D.R. Kaprekar. It's a simple game that, for most four-digit numbers, always leads to the same result: **6174**.
2+
3+
Let's dive in and see how it works!
4+
5+
## The Rules of the Game
6+
7+
1. **Pick a four-digit number** with at least two different digits. (Numbers like 1111, 2222, etc., won't work).
8+
2. **Arrange the digits** to form the largest possible number.
9+
3. **Arrange the same digits** to form the smallest possible number.
10+
4. **Subtract** the smallest number from the largest number.
11+
5. **Repeat** steps 2-4 with the new number you get.
12+
13+
You'll be amazed at what happens!
14+
15+
## Example 1: Starting with 3524
16+
17+
Let's try with the number **3524**:
18+
19+
* **Step 1:** Our number is 3524. It has different digits.
20+
* **Step 2:** Largest number: 5432
21+
* **Step 3:** Smallest number: 2345
22+
* **Step 4:** Subtract: 5432 - 2345 = **3087**
23+
24+
Now, we repeat the process with **3087**:
25+
26+
* **Step 2:** Largest number: 8730
27+
* **Step 3:** Smallest number: 0378 (remember to include leading zeros to keep it a four-digit number)
28+
* **Step 4:** Subtract: 8730 - 0378 = **8352**
29+
30+
Repeat with **8352**:
31+
32+
* **Step 2:** Largest number: 8532
33+
* **Step 3:** Smallest number: 2358
34+
* **Step 4:** Subtract: 8532 - 2358 = **6174**
35+
36+
And there it is! We reached 6174.
37+
38+
## Example 2: Starting with 1987
39+
40+
Let's try another one with **1987**:
41+
42+
* **Step 1:** Our number is 1987.
43+
* **Step 2:** Largest number: 9871
44+
* **Step 3:** Smallest number: 1789
45+
* **Step 4:** Subtract: 9871 - 1789 = **8082**
46+
47+
Repeat with **8082**:
48+
49+
* **Step 2:** Largest number: 8820
50+
* **Step 3:** Smallest number: 0288
51+
* **Step 4:** Subtract: 8820 - 0288 = **8532**
52+
53+
Repeat with **8532**:
54+
55+
* **Step 2:** Largest number: 8532
56+
* **Step 3:** Smallest number: 2358
57+
* **Step 4:** Subtract: 8532 - 2358 = **6174**
58+
59+
Again, we arrived at 6174!
60+
61+
## The Magic of 6174
62+
63+
This number, 6174, is known as **Kaprekar's Constant**. For almost any four-digit number (with at least two different digits), if you keep applying Kaprekar's routine, you will eventually reach 6174. Once you reach 6174, the next step will always be:
64+
65+
* Largest: 7641
66+
* Smallest: 1467
67+
* Subtract: 7641 - 1467 = **6174**
68+
69+
It's a loop!
70+
71+
Kaprekar's routine is a wonderful example of how simple arithmetic operations can lead to unexpected and beautiful mathematical constants. Try it with your own four-digit numbers and see the magic unfold!

0 commit comments

Comments
 (0)