Site hosted by Angelfire.com: Build your free website today!

Mine Java Study material

Sorting
MVC
Tablespaces and Datafiles

Sorting

SORTING ALGO
------------
 faster algorithms known (e.g., QuickSort, RadixSort and Merge-Sort)

 The main five sorting algorithms can be divided into two groups. 
 Bubble Sort, Selection Sort and Insertion Sort are fairly straightforward, but they are relatively inefficient except for small lists. 
 Merge Sort and QuickSort are more complicated, but also much faster for large lists. 
 QuickSort is, on average, the fastest. Bubble Sort is the slowest. 
 Bubble Sort is often the first -- and sometimes the only -- sorting method that students learn. 



 Java use modified merge sort program
 The sort operation uses a slightly optimized merge sort algorithm. This algorithm is: 

Fast: It is guaranteed to run in n log(n) time and runs substantially faster on nearly sorted lists. Empirical tests showed it to be as fast as a highly optimized quicksort. Quicksort is generally regarded to be faster than merge sort but isn't stable and doesn't guarantee n log(n) performance. 
Stable: It doesn't reorder equal elements. This is important if you sort the same list repeatedly on different attributes. If a user of a mail program sorts the in-box by mailing date and then sorts it by sender, the user naturally expects that the now-contiguous list of messages from a given sender will (still) be sorted by mailing date. This is guaranteed only if the second sort was stable.



http://www.cs.usask.ca/resources/tutorials/csconcepts/1998_4/bubble/2-1.html

MVC

MVC concepts

Model-View-Controller is the concept introduced by Smalltalk's inventors (TrygveReenskaug and others) of encapsulating some data together with its processing (the model) and isolate it from the manipulation (the controller) and presentation (the view) part that has to be done on a UserInterface. A model, therefore is an object representing data or even activity, e.g. a database table or even some plant-floor production-machine process. A view is some form of visualization of the state of the model. A controller offers facilities to change the state of the model. Smalltalk provides mechanisms to link models, views and controllers in some standard way in order for a model to communicate state changes to every attached view (there can be several, as you can see). Model state changes happen either because a controller issued some command or for some internal reason --------------------------------