Monday, 20 February 2017

Selection Sort

In computer science, a selection sort is a sorting algorithm, specifically an in-place comparison sort. It has O(n2) time complexity, making it inefficient on large lists, and generally performs worse than the similar insertion sort. Selection sort is noted for its simplicity, and also has performance advantages over more complicated algorithms in certain situations, particularly where auxiliary memory is limited.

Bubble Sort

Bubble sort, sometimes incorrectly referred to as sinking sort, is a simple sorting algorithm that works by repeatedly stepping through the list to be sorted, comparing each pair of adjacent items and swapping them if they are in the wrong order. The pass through the list is repeated until no swaps are needed, which indicates that the list is sorted. The algorithm gets its name from the way smaller elements "bubble" to the top of the list. Because it only uses comparisons to operate on elements, it is a comparison sort. Although the algorithm is simple, most of the other sorting algorithms are more efficient for large lists.

Sorting Data Structure

Java Script Event


Java Script Event

Java script is a scripting language intended to handle event, rise from different controls of HTML. If you want to learn java script then you need to first learn about event.

An event is generated by a control,page or any other type of activity . Event is generated through user, software, browser,server etc. with the help of  event system acknowledge that something is happening  . Example of different types of events are click,double click,mouse over , mouse out etc. When an event is generated an event handler is require to capture that particular event. I have added some example of most fundamental event in following code. After that you will be able handle some important event .