Assignment-1_Java
Assignment-1_Java
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:
Given an array of integers, find the second largest element without sorting the
array.
Check if the Array is Sorted:
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.