0% found this document useful (0 votes)
5 views5 pages

Hanan DSA

Uploaded by

life hour
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
5 views5 pages

Hanan DSA

Uploaded by

life hour
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 5

1.

Write a Java program that takes an array of integers and a target integer as input and returns the
index of the target integer in the array. If the target integer is not found, return -1.
2. Write a Java program that takes an array of integers as input and returns the maximum element in
the array.
3.Write a Java program that takes an array of integers as input and returns the minimum element in the
array.
4. Write a Java program that takes an array of integers as input and returns the sum of all elements in
the array.
5. Write a Java program that takes an array of integers and two indices as input and swaps the elements
at the specified indices in the array.

Muhammad Hanan Sajid Roll #1230

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy