Welcome to my little corner of GitHub! I'm just a dev who loves turning caffeine into code and occasionally breaking things in the process (but hey, that's how we learn, right? π ).
I have a weird obsession with optimizing code that's already working fine. Like, seriously, I'll spend 3 hours making something run 0.2 seconds faster just because I can. Also, I unironically enjoy debugging at 2 AM β there's something magical about solving problems when the world is quiet!
From frontend magic to backend wizardry, here's what I like to play around with:
Here's something I wrote recently that made me smile β a simple but clean implementation:
#include <iostream>
#include <vector>
#include <algorithm>
class QuickSort {
public:
static void sort(std::vector<int>& arr, int low, int high) {
if (low < high) {
int pivot = partition(arr, low, high);
sort(arr, low, pivot - 1);
sort(arr, pivot + 1, high);
}
}
private:
static int partition(std::vector<int>& arr, int low, int high) {
int pivot = arr[high];
int i = low - 1;
for (int j = low; j < high; j++) {
if (arr[j] < pivot) {
std::swap(arr[++i], arr[j]);
}
}
std::swap(arr[i + 1], arr[high]);
return i + 1;
}
};
int main() {
std::vector<int> numbers = {64, 34, 25, 12, 22, 11, 90};
std::cout << "Before sorting: ";
for (int num : numbers) std::cout << num << " ";
QuickSort::sort(numbers, 0, numbers.size() - 1);
std::cout << "\nAfter sorting: ";
for (int num : numbers) std::cout << num << " ";
std::cout << std::endl;
return 0;
}
Sometimes the classics just hit different, you know?
Thanks for stopping by! Feel free to check out my repos, and don't hesitate to reach out if you want to chat about code, tech, or just need someone to debug with at ungodly hours