Question: 1. List out Linear and Non Linear data structures and explain them briefly. 2a) Write an algorithm for Bubble Sort.Also sort the folowing numbers
1. List out Linear and Non Linear data structures and explain them briefly. 2a) Write an algorithm for Bubble Sort.Also sort the folowing numbers using Bubble sort: 45, 23, 5, 41,5, 1, 20 2b) Sort the following list of numbers using Selecton sort, write all the steps. Also find the Computing time of Selecton sort. 56, 78,21, 17, 43, 65, 70, 26, 25 3a) Write an algorithm to accept an integer n and find the sum of first n square numbers. Also Compute the total computing time of the above algorithm. 3b) Find the Big-Oh for the following f(n). f(n)=60n*+ n + nlogan i) ii) f(n)=n +n+ 1000000 4) Compute the total computing time T(n) of the following algorithm and express it in O notation. (n is the size of input 1. Initialize sum to 0 2. Initialize count to 0 3. while (count
Step by Step Solution
3.38 Rating (151 Votes )
There are 3 Steps involved in it
Sure let me address each question step by step 1 List out Linear and Non Linear data structures and explain them briefly Linear data structures Arrays A collection of elements identified by index or k... View full answer
Get step-by-step solutions from verified subject matter experts
