Download as pdf or txt
Download as pdf or txt
You are on page 1of 3

ARRAYS

1. Write a Program to print the number of elements in an array.


2. Write a Program to print the number of non-zero elements.
3. Write a Program to print the number of even elements & odd elements.
4. Write a Program to find the largest number in an array.
5. Write a Program to find the smallest number in an array.
6. Write a Program to find the sum of all elements in an array.
7. Write a Program to find the product of all numbers in the array.
8. Write a Program to find the sum of all even numbers in an array.

Y
9. Write a Program to find the sum of all odd numbers in an array.
10.Write a Program to find the difference between the sum of even numbers

EM
& odd numbers.
11.Write a Program to find the second largest number without sorting.
12.Write a Program to find the index of a specific number in an unsorted
array.
D
13.Write a Program to find the index of a specific number in a sorted array.
14.Write a Program to sort the given array in ascending order.
CA

15.Write a Program to sort the given array in descending order.


16.Write a Program to merge two arrays.
17.Write a Program to copy all the elements of one array to another array.
18.Write a Program to store the square of all the numbers in the resultant
A

array.
19.Write a Program to find the index of the largest number.
P

20.Write a Program to find the index of the smallest number.


21.Write a Program to reverse an array.
TA

22.Write a Program to find the sum of diagonal elements of the matrix.


23.Write a Program to find the largest number in the matrix.
24.Write a Program to print the transpose of a matrix.
25.Write a Program to find the sum of 2 matrices.
Hackerrank Programs:

https://www.hackerrank.com/challenges/divisible-sum-pai
Divisible Sum Pairs rs/problem
https://www.hackerrank.com/challenges/mini-max-sum/pr
Mini-Max Sum oblem
Birthday Cake https://www.hackerrank.com/challenges/birthday-cake-ca
Candles ndles/problem
https://www.hackerrank.com/challenges/apple-and-orange
Apple and Orange /problem
https://www.hackerrank.com/challenges/migratory-birds/

Y
Migratory Birds problem
https://www.hackerrank.com/challenges/sherlock-and-arra

EM
Sherlock and Array y/problem
https://www.hackerearth.com/practice/data-structures/arra
Odd one Out ys/1-d/practice-problems/algorithm/find-the-odd/
https://www.hackerearth.com/practice/data-structures/arra
D
Help Jarvis! ys/1-d/practice-problems/algorithm/help-jarvis-8a39566e/
https://www.hackerrank.com/challenges/the-hurdle-race/p
CA

Hurdle race roblem


https://www.hackerrank.com/challenges/angry-professor/
Angry Professor problem
A

Circular Array https://www.hackerrank.com/challenges/circular-array-rot


Rotation ation/problem
P

The Array Problem https://www.codechef.com/problems/ARRPROB


https://www.hackerrank.com/challenges/ctci-array-left-rot
TA

Left Rotation ation/problem?h_r=internal-search


Climbing the https://www.hackerrank.com/challenges/climbing-the-lea
Leaderboard derboard/problem
Codechef Problems:

https://www.codechef.com/problems/KTT
Kitchen Timetable ABLE
https://www.codechef.com/problems/GOO
Good Weather DWEAT
https://www.codechef.com/submit-v2/PRA
Practice makes us perfect CTICEPERF
https://www.codechef.com/submit-v2/REC
Recent contest problems ENTCONT

Y
https://www.codechef.com/submit-v2/MA
playing with matches TCHES

EM
https://www.codechef.com/submit-v2/DO
Red Light, Green Light, LL
https://www.codechef.com/submit-v2/NU
D
Counting pretty numbers M239
https://www.codechef.com/submit-v2/TOD
CA

Problems in your to do list OLIST


The Lead Game https://www.codechef.com/submit-v2/TLG
https://www.codechef.com/submit-v2/CO
A

Compress the video MPRESSVD


https://www.codechef.com/submit-v2/CFR
P

Devu and friendship testing TEST


TA

https://www.codechef.com/submit-v2/WA
That Is My Score! TSCORE
https://www.codechef.com/submit-v2/PRO
The Great Run C18A
Chef and Dolls https://www.codechef.com/submit/MISSP
https://www.codechef.com/submit/CFRTE
Devu and friendship testing ST
https://www.codechef.com/submit/WATSC
That is my score ORE

You might also like