Tags » Programming - Notes

Merge Sort

#include<bits/stdc++.h>
using namespace std;
int arr;
int temp;
void Merged(int left,int mid,int right){
    int i(left),j(mid+1),k(left);
    while(i<=mid and j<=right){
        if(arr[i]<arr[j]){
            temp = arr;
        }else if(arr[i]>arr[j]){
            temp = arr;
        }
    }
    while(i<=mid){
        temp = arr;
    }
    while(j<=right){
        temp = arr;
    }
    for(int l = left;l<=right;l++){
        arr[l] = temp[l];
    }
}
void MergeSort(int left,int right){

    if(left<right){
        int mid = (left+right)/2;
        MergeSort(0,mid);
        MergeSort(mid+1,right);
        Merged(left,mid,right);
    }
}
int main(){
    int n;
    cout<<"Number Data (MAX-100): ";
    cin>>n;
    cout<<"Insert Data: ";
    for(int i = 0;i<n;i++){
        cin>>arr[i];
    }
    MergeSort(0,n-1);
    cout<<endl<<"After sorting: ";
    for(int i = 0;i<n;i++){
        cout<<arr[i]<<" ";
    }

}

… 23 more words
Algorithm

100 Days of Milo: Day 44 -- The Livejournal Archive

For many years, I maintained an active livejournal account. I met a number of wonderful people through that website, and had a lot of great conversations, but much of writing was (like ti is here) quick and dirty. 25 more words

100 Days of Milo: Day 42 -- Totals

Perhaps the least read pages on this website are my weekly “Total” pages where I recap  my exercise and reading. I get it, who the fuck care. 45 more words

100 Days of Milo: Day 41 -- Divine Madness

Back from a much needed break, and back to 100 days of Milo. For day 41, here’s one of the most popular pages on the website, … 55 more words

Programming note -- vacation

In case for some reason your check Milo regularly, know that I am on a much needed vacation with my family. The Boston Qualifier Questionnaire, 100 days of milo, and everything else will resume when I return on February 22.

Programming Notes

100 Days of Milo: Day 39 Quoth the Runner

A collection of posts of thoughtful or inspiring running quotes, often with pictures, can be found here. 

100 Days of Milo: Day 38 -- Prospect Park Legends

Here’s a page collecting the posts I write on well known or inspiring atheletes who frequent my local park, Prospect Park in Brooklyn, NY.