This day we learnt about the various types of sorting techniques which included Selection sort, Insertion Sort, Bubble Sort and Binary Search.
We learnt the real examples for each of the sorting techniques.
Selection Sort- We wrote random numbers and the technique that we used was Selection Sort technique, ie, from the set of given numbers we selected one number at a time that was least and wrote it at the beginning of the list. The same way in Selection Sort the least of all number is picked, stored in a variable...
About Insertion sort, we learnt with a real example of a deck of cards. Suppose we pick 10 random cards from the deck, so each time we pick a card we keep inserting it to its position according to the order.
In Bubble Sort a adjcent number is compared the number which is less is swapped to before.
We also wrote a program with a for loop and an if statement which prints numbers from 1 to 10, except numbers 6 and 9, which should be like
for(i=1;i<=10;i++)
{
if (i!=0|| i!=9)
{
printf("%d",&i);
}
}
Sir explained that if somebody knows how to put the simple If and Loops in the above programs, he can read and write any algorithim in this paper
Some Articles we found interesting and which is connected to today's topic are listed below
Some Articles we found interesting and which is connected to today's topic are listed below
No comments:
Post a Comment