Definition: Selection sort is a sorting technique where the smallest element is taken from the array and placed at the first, same steps are continued for rest of the elements. Steps for Selection Sort: 1. Get the smallest element from the array list. 2. Exchange it …
Definition: Bubble sort is a sorting algorithm. It will sort by checking if the next element is greater the present element, if greater then it will swap the elements. Steps to perform for bubble sort: 1. In bubble sort we use 2 for loops. Outer loop …
In this chapter we shall learn about below topics: 6.1 Big Omega 6.2 Example 6.3 Big Theta Ø In the previous chapter we learnt about Big O notation, that defines tight upper bound. In this chapter we shall see about Big Omega and Big Theta notation. …
In this chapter we shall look at: 2.1 Why we need to calculate the performance of an algorithm? 2.2 What is space complexity? 2.3 Classification of space complexity 2.3.1 Fixed or constant space complexity 2.3.2 Linear space complexity 2.1 Before we go to space complexity, …