Assignment : 1
Submission : 5 Feb 2025
Initialize an Array and Take Input:
Write a program to initialize an array of integers, take user input to fill the
array, and then print the array.
Find Maximum and Minimum in an Array:
Given an array of integers, write a program to find the maximum and minimum values
in the array.
Reverse the Array:
Write a function that reverses an array without using any additional array.
Rotate Array by k Steps:
Write a program to rotate an array of integers by 'k' steps to the right.
Count Frequency of Each Element in an Array:
Write a program to count the frequency of each element in a given array.
Find the Second Largest Element in an Array:
Given an array of integers, find the second largest element without sorting the
array.
Check if the Array is Sorted:
Write a program to check if a given array is sorted in ascending order.
Searching and Sorting:
Linear Search and Binary Search:
Implement both Linear Search and Binary Search algorithms to find an element in a
sorted array and unsorted array respectively.
Bubble Sort and Selection Sort:
Write a program to sort an array using Bubble Sort and Selection Sort, and compare
their performance.
Find First and Last Occurrence of a Number in a Sorted Array:
Given a sorted array, find the first and last occurrence of a specific number.