Geschreven door studenten die geslaagd zijn Direct beschikbaar na je betaling Online lezen of als PDF Verkeerd document? Gratis ruilen 4,6 TrustPilot
logo-home
Presentatie

Calculas

Beoordeling
-
Verkocht
-
Pagina's
42
Geüpload op
29-01-2026
Geschreven in
2025/2026

Calculas contains Differentiation, Integration and Differential equations.

Instelling
Vak

Voorbeeld van de inhoud

FY-PSAP LAB EXAM AY:2024-25 SEM-I

A01
Problem: Given an array of integers, find the maximum element.
Input Format:
First line: Integer n (size of the array).
Second line: n space-separated integers
(elements of the array).
Output Format:
Single integer representing the maximum
element.
Test Case:
Input:
5
13705
Output:
7

A03
Problem: Count how many even and odd numbers are present in an array.
Input Format:
First line: Integer n.
Second line: n space-separated integers.
Output Format:
Two integers: count of even numbers and count of odd numbers.
Test Case:
Input:
6
123456
Output:
33

A04
Problem: Find the second largest element in an array.
Input Format:

First line: Integer n.
Second line: n space-separated integers.
Output Format:
Single integer representing the second largest element.
Test Case:
Input:
5
10 20 20 30 40
Output:30

, FY-PSAP LAB EXAM AY:2024-25 SEM-I

A05

Problem: Reverse the elements of an array.
Input Format:

First line: Integer n.
Second line: n space-separated integers.
Output Format:
A single line with n space-separated integers in reversed order
Test Case:
Input:
5
12345
Output:
54321


A06
Problem: Rotate the elements of an array to the left by k positions.

Input Format:
First line: Integers n (size of the array) and k
(number of positions to rotate).
Second line: n space-separated integers.
Output Format:
A single line with n space-separated integers after
rotation.
Test Case:
Input:
62
123456
Output:
345612

A07
Problem: Find all unique elements in an array.




A08

, FY-PSAP LAB EXAM AY:2024-25 SEM-I

Given an array of size n-1 containing integers from 1 to n with one number missing, find the
missing number.
Input Format:
First line: Integer n.
Second line: n-1 space-separated integers.
Output Format:
Single integer representing the missing number.
Test Case:
Input:
5
1245
Output:
3

A09

Problem: Find the element that appears more than n/2 times in an array. If no such element
exists, output -1.
Input Format:
First line: Integer n.
Second line: n space-separated integers.
Output Format:
Single integer representing the majority element
or -1 if no majority element exists.
Test Case:
Input:
6
334233
Output:
3

A10

Problem: Given an array of integers, find the minimum element.


A11

Problem: Find the index of a given target element in an array. If the element is not found, output -1.

, FY-PSAP LAB EXAM AY:2024-25 SEM-I

A12

Problem: Find all elements common in two arrays.

A15

Problem: A peak element is an element that is greater than its neighbors. Find any one peak
element in the array.
Input Format:
First line: Integer n.
Second line: n space-separated integers.
Output Format:
Single integer representing the peak element.
Test Case:
Input:
5
1 3 20 4 1
Output:
20

A16

Problem: Write a program to find the transpose of a given matrix.

A17

Problem: Write a program to calculate the sum of each row and each column of a given matrix.
Input Format:
First line: Two integers n and m (dimensions of the matrix).
Next n lines: m space-separated integers (matrix elements).
Output Format:
First line: Row sums as space-separated integers.
Second line: Column sums as space-separated
integers.
Test Case:
Input:
23
123
456
Output:
6 15
579

Geschreven voor

Instelling
Vak

Documentinformatie

Geüpload op
29 januari 2026
Aantal pagina's
42
Geschreven in
2025/2026
Type
PRESENTATIE
Persoon
Onbekend

Onderwerpen

$16.19
Krijg toegang tot het volledige document:

Verkeerd document? Gratis ruilen Binnen 14 dagen na aankoop en voor het downloaden kun je een ander document kiezen. Je kunt het bedrag gewoon opnieuw besteden.
Geschreven door studenten die geslaagd zijn
Direct beschikbaar na je betaling
Online lezen of als PDF

Maak kennis met de verkoper
Seller avatar
aayushgirase

Maak kennis met de verkoper

Seller avatar
aayushgirase
Volgen Je moet ingelogd zijn om studenten of vakken te kunnen volgen
Verkocht
-
Lid sinds
3 maanden
Aantal volgers
0
Documenten
1
Laatst verkocht
-

0.0

0 beoordelingen

5
0
4
0
3
0
2
0
1
0

Recent door jou bekeken

Waarom studenten kiezen voor Stuvia

Gemaakt door medestudenten, geverifieerd door reviews

Kwaliteit die je kunt vertrouwen: geschreven door studenten die slaagden en beoordeeld door anderen die dit document gebruikten.

Niet tevreden? Kies een ander document

Geen zorgen! Je kunt voor hetzelfde geld direct een ander document kiezen dat beter past bij wat je zoekt.

Betaal zoals je wilt, start meteen met leren

Geen abonnement, geen verplichtingen. Betaal zoals je gewend bent via iDeal of creditcard en download je PDF-document meteen.

Student with book image

“Gekocht, gedownload en geslaagd. Zo makkelijk kan het dus zijn.”

Alisha Student

Bezig met je bronvermelding?

Maak nauwkeurige citaten in APA, MLA en Harvard met onze gratis bronnengenerator.

Bezig met je bronvermelding?

Veelgestelde vragen