Quick Sort Implementation in C

Quicksort is an efficient sorting algorithm, serving as a systematic method for placing the elements of an array in order. Developed by Tony Hoare in 1959, published in 1961, it is still a commonly used algorithm for sorting. When implemented well, it can be about two or three times faster than its main competitors, merge

Read More

Sort a Scrambled Itinerary

This algorithm problem is from Google Code Jam. Here is the description of the problem. Once upon a day, Mary bought a one-way ticket from somewhere to somewhere with some flight transfers. For example: SFO->DFW DFW->JFK JFK->MIA MIA->ORD. Obviously, transfer flights at a city twice or more doesn’t make any sense. So Mary will not

Read More

Web server in one line of shell code

If you want to quickly save a file through http but you don’t want to install a web server, you can just use netcat. You can run: index.html can be any file you want to serve it. You can access it after that as: http://<YOUR HOST>:8080/

Read More

Linux Kernel boot sequence

Execution in Assembly Entry point for Kernel uncompressed – arch/arm/kernel/head.S Read processor ID in coprocessor and obtain proc_info_list pointer Lookup machine type based on mach-id passed by bootloader (R1), get the mach_desc pointer and save mach-id Determine vailidity of ATAGS pointer (R2) and save Setup minimal pagetable to get Kernel running on virtual address, also

Read More

1 2 3 6