Thursday, May 20, 2010
Sorting
Good site : http://www.cs.auckland.ac.nz/software/AlgAnim/sorting.html
BiG o Notation : http://www.youtube.com/watch?v=6Ol2JbwoJp0&feature=channel
video : Big O, Big Omega, and Big Theta Notation
1. Bubble Sort
Video : http://www.youtube.com/watch?v=vxENKlcs2Tw&feature=related
for i = n down to 1
for j = 1 to i-1
if A[j] < v="Fr0SmtN0IJM&feature="related" and="" an="" unsorted="" x="">= i */
for(i=1;i v ) {
a[j] = a[j-1]; j = j-1;
if ( j <= 0 ) break; } /* Stopped when a[j-1] <= v, so put v at position j */ a[j] = v; } } 3. selection sort Video : http://www.youtube.com/watch?v=TW3_7cD9L1A&feature=channel Selection sort is the most conceptually simple of all the sorting algorithms. It works by selecting the smallest (or largest, if you want to sort from big to small) element of the array and placing it at the head of the array. Then the process is repeated for the remainder of the array; the next largest element is selected and put into the next slot, and so on down the line. The idea of selection sort is rather simple: we repeatedly find the next largest (or smallest) element in the array and move it to its final position in the sorted array. Assume that we wish to sort the array in increasing order, i.e. the smallest element at the beginning of the array and the largest element at the end. We begin by selecting the largest element and moving it to the highest index position. We can do this by swapping the element at the highest index and the largest element. We then reduce the effective size of the array by one element and repeat the process on the smaller (sub)array. The process stops when the effective size of the array becomes 1 (an array of 1 element is already sorted). void selection_sort(int x[], int lim) { int i, eff_size, maxpos, tmp; for (eff_size = lim; eff_size > 1; eff_size--) {
for (i = 0; i < maxpos =" x[i]"> x[maxpos] ? i : maxpos;
tmp = x[maxpos];
x[maxpos] = x[eff_size - 1];
x[eff_size - 1] = tmp;
}
}
4 Quick Sort : Video : good one : YouTube - QuickSort
Video : http://www.youtube.com/watch?v=y_G9BkAm6B8&NR=1&feature=fvwp
video : http://www.youtube.com/watch?v=vxENKlcs2Tw&feature=related
5. Merg Sort :
Video : http://www.youtube.com/watch?v=7i8V9wLJPEg&feature=channel
6. Heap sort :
Video : http://www.youtube.com/watch?v=WYII2Oau_VY&feature=related
7. Dijkstra's Algorithm
Video : http://www.youtube.com/watch?v=8Ls1RqHCOPw&feature=related
BiG o Notation : http://www.youtube.com/watch?v=6Ol2JbwoJp0&feature=channel
video : Big O, Big Omega, and Big Theta Notation
1. Bubble Sort
Video : http://www.youtube.com/watch?v=vxENKlcs2Tw&feature=related
for i = n down to 1
for j = 1 to i-1
if A[j] < v="Fr0SmtN0IJM&feature="related" and="" an="" unsorted="" x="">= i */
for(i=1;i
a[j] = a[j-1]; j = j-1;
if ( j <= 0 ) break; } /* Stopped when a[j-1] <= v, so put v at position j */ a[j] = v; } } 3. selection sort Video : http://www.youtube.com/watch?v=TW3_7cD9L1A&feature=channel Selection sort is the most conceptually simple of all the sorting algorithms. It works by selecting the smallest (or largest, if you want to sort from big to small) element of the array and placing it at the head of the array. Then the process is repeated for the remainder of the array; the next largest element is selected and put into the next slot, and so on down the line. The idea of selection sort is rather simple: we repeatedly find the next largest (or smallest) element in the array and move it to its final position in the sorted array. Assume that we wish to sort the array in increasing order, i.e. the smallest element at the beginning of the array and the largest element at the end. We begin by selecting the largest element and moving it to the highest index position. We can do this by swapping the element at the highest index and the largest element. We then reduce the effective size of the array by one element and repeat the process on the smaller (sub)array. The process stops when the effective size of the array becomes 1 (an array of 1 element is already sorted). void selection_sort(int x[], int lim) { int i, eff_size, maxpos, tmp; for (eff_size = lim; eff_size > 1; eff_size--) {
for (i = 0; i < maxpos =" x[i]"> x[maxpos] ? i : maxpos;
tmp = x[maxpos];
x[maxpos] = x[eff_size - 1];
x[eff_size - 1] = tmp;
}
}
4 Quick Sort :
Video : http://www.youtube.com/watch?v=y_G9BkAm6B8&NR=1&feature=fvwp
video : http://www.youtube.com/watch?v=vxENKlcs2Tw&feature=related
5. Merg Sort :
Video : http://www.youtube.com/watch?v=7i8V9wLJPEg&feature=channel
6. Heap sort :
Video : http://www.youtube.com/watch?v=WYII2Oau_VY&feature=related
7. Dijkstra's Algorithm
Video : http://www.youtube.com/watch?v=8Ls1RqHCOPw&feature=related
Wednesday, May 19, 2010
Monday, May 17, 2010
swiss trip
http://www.swisstoursindia.com/
For further details & bookings, kindly mail us at contact@swisstoursonline.com or call us at (022) 67439990 / 67137240 Extn. 50/ 70/ 73 / 74
Bangalore
No. 17, Parkview
Curve Road, Tasker Town
Bangalore -560 051
Tel. 080-41132172
Fax. 080 25320079
Email: swisstoursblr@gmail.com
Email: contactus.blr@swiss.com
Q. can we book Mt titlis, pitlis, zungfro with you?
Q. can we reserv glasier train ticket with you?
For further details & bookings, kindly mail us at contact@swisstoursonline.com or call us at (022) 67439990 / 67137240 Extn. 50/ 70/ 73 / 74
Bangalore
No. 17, Parkview
Curve Road, Tasker Town
Bangalore -560 051
Tel. 080-41132172
Fax. 080 25320079
Email: swisstoursblr@gmail.com
Email: contactus.blr@swiss.com
Q. can we book Mt titlis, pitlis, zungfro with you?
Q. can we reserv glasier train ticket with you?
Wednesday, May 12, 2010
swiss trip imp info
http://www.raileurope.co.in/
Why peak at one?
A Swiss Pass will let you travel on scenic rails all over Switzerland, including the Glacier Express with nothing more than a reservation. So think carefully. Is one day trip enough, or is it just the icing on the glacier?
Swiss Pass
Neeraj : not sure if we really need to buy "Glacier Express" if we have swiss pass. i think it free. we must find out this option.
Hi Sherill,
Check this website for Glacier Express and Swiss Pass info:
www.swisstravelsystem.ch/Glacier_Express.31.0.html?&L=2
www.swisstravelsystem.ch/Tickets.16.0.html?&L=2
We went from St. Moritz to Zermatt on the Glacier Express. While
I don't know what 1st class was like, we were quite comfortable
in 2nd class.... except for the loooong trip. It was closer to 9
hours. We did have reservations for the GE trip. We used an 8
day Swiss Pass (2nd class) and were completely satisfied with
our choice on all the trains we used.
Paul
Read more: http://www.frommers.com/community/forum.cfm/europe/switzerland/traveling-glacier-express-using-swiss-pass#ixzz0ni9XoAH2
good site to compare swiss pass / swiss card / ticket
http://www.switzerlandguide.com/transportation-swiss-pass-or-swiss-card.htm
http://www.switzerlandguide.com/tours-rail-glacier-express.htm
Try to find what is golden pass train from from Lucerne to Interlaken Ost by Golden Pass Panoramic train.
reserve your seat at the same time when you buy your Swiss Card or reserve your seat through the site of goldenpass.ch
Why peak at one?
A Swiss Pass will let you travel on scenic rails all over Switzerland, including the Glacier Express with nothing more than a reservation. So think carefully. Is one day trip enough, or is it just the icing on the glacier?
Swiss Pass
Neeraj : not sure if we really need to buy "Glacier Express" if we have swiss pass. i think it free. we must find out this option.
Hi Sherill,
Check this website for Glacier Express and Swiss Pass info:
www.swisstravelsystem.ch/Glacier_Express.31.0.html?&L=2
www.swisstravelsystem.ch/Tickets.16.0.html?&L=2
We went from St. Moritz to Zermatt on the Glacier Express. While
I don't know what 1st class was like, we were quite comfortable
in 2nd class.... except for the loooong trip. It was closer to 9
hours. We did have reservations for the GE trip. We used an 8
day Swiss Pass (2nd class) and were completely satisfied with
our choice on all the trains we used.
Paul
Read more: http://www.frommers.com/community/forum.cfm/europe/switzerland/traveling-glacier-express-using-swiss-pass#ixzz0ni9XoAH2
good site to compare swiss pass / swiss card / ticket
http://www.switzerlandguide.com/transportation-swiss-pass-or-swiss-card.htm
http://www.switzerlandguide.com/tours-rail-glacier-express.htm
Try to find what is golden pass train from from Lucerne to Interlaken Ost by Golden Pass Panoramic train.
reserve your seat at the same time when you buy your Swiss Card or reserve your seat through the site of goldenpass.ch
Monday, May 10, 2010
Audio podcast
http://webcast.berkeley.edu/course_details_new.php?seriesid=2009-D-51989|2009-D-74480&semesterid=2009-D
http://www.learnoutloud.com/podcaststream/podcast_vedio.php?url=http://webcast.berkeley.edu/media/common/courses/fall_2009/letters_and_science_c160v_001/66f003d6-54c0-4992-90b3-20adca046c24_opencast_audio_course_alldist.m4a&title=Lecture%201
http://www.learnoutloud.com/podcaststream/podcast_vedio.php?url=http://webcast.berkeley.edu/media/common/courses/fall_2009/letters_and_science_c160v_001/66f003d6-54c0-4992-90b3-20adca046c24_opencast_audio_course_alldist.m4a&title=Lecture%201
Friday, May 7, 2010
Subscribe to:
Posts (Atom)