SINGLE DIMENSION ARRAYS

99 programming challenges to help you master the fundamentals of DATA STRUCTURES.

1

Enter an array from user and display all the value ?

2

Enter an array from user and print the array in reverse order ?

3

Enter an array from user and copy the array into second array?

4

Enter an array from user and copy it into another array in reverse order?

5

Enter an array from user and print the number which is even ?

6

Enter an array from user and print the number which is positive ?

7

Enter an array from user and square all the values of array ?

8

Enter an array from user and find maximum and minimum value?

9

Enter an array from user and find the k-th smallest value?

10

Enter an array from user and add all values ?

11

Enter an array from user and find the duplicate values?

12

Enter an array from user and remove the duplicate values and fill with zero?

13

Enter an array from user and count the duplicate values?

14

Enter an array from user and print all possible combinations of the elements?

15

Enter an array from user and print all the palindrome numbers?

16

Enter two arrays from the user and check they are same or not?

17

Merge the two sorted arrays into one array but in sorted order?

18

Find the local minima in the array? (An element in an array is a local minima if it less than the element after it, and the element before it)

19

Find the local maxima in the array? (An element in an array is a local maxima if it greater than the element after it, and the element before it)

20

Trapping Rain Water Problem: Given n non-negative integers representing an elevation map where the width of each bar is 1, compute how much water it can trap after raining.

21

Program to copy all elements of one array into another array

22

Program to find the frequency of each element in the array

23

Program to left rotate the elements of an array

24

Program to print the duplicate elements of an array

25

Program to print the elements of an array

26

Program to print the elements of an array in reverse order

27

Program to print the elements of an array present on even position

28

Program to print the elements of an array present on odd position

29

Program to print the largest element in an array

30

Program to print the smallest element in an array

31

Program to print the number of elements present in an array

32

Program to print the sum of all the items of the array

33

Program to right rotate the elements of an array

34

Program to sort the elements of an array in ascending order

35

Program to sort the elements of an array in descending order

36

Program to Find 3rd Largest Number in an array

37

Program to Find 2nd Largest Number in an array

38

Program to Find Largest Number in an array

39

to Program Find 2nd Smallest Number in an array

40

Program to Find Smallest Number in an array

41

Program to Remove Duplicate Element in an array

42

Program to Print Odd and Even Numbers from an array

43

How to Sort an Array in Java

44

Program to copy all elements of one array into another array

45

Program to find the frequency of each element in the array

46

Program to left rotate the elements of an array

47

Program to print the duplicate elements of an array

48

Program to print the elements of an array

49

Program to print the elements of an array in reverse order

50

Program to print the elements of an array present on even position

51

Program to print the elements of an array present on odd position

52

Program to print the largest element in an array

53

Program to print the smallest element in an array

54

Program to print the number of elements present in an array

55

Program to print the sum of all the items of the array

56

Program to right rotate the elements of an array

57

Program to sort the elements of an array in ascending order

58

Program to sort the elements of an array in descending order

59

Program to Find 3rd Largest Number in an array

60

Program to Find 2nd Largest Number in an array

61

Program to Find Largest Number in an array

62

C++ Program Find 2nd Smallest Number in an array

63

Program to Find Smallest Number in an array

64

Program to Remove Duplicate Element in an array

65

Program to Print Odd and Even Numbers from an array

66

Write a C++ program to swap the first and last elements of an array and create a new array

67

Write a C++ program to count the number of even and odd elements in a given array

68

Write a C++ program to sum values of an array

69

Write a C++ program to find the index of an array element

70

Write a C++ program to calculate the average value of array elements

71

Write a C++ program to test if an array contains a specific value

72

Write a C++ program to find the maximum and minimum value of an array

73

Write a C++ program to insert an element (specific position) into an array

74

Write a C++ program to reverse an array of integer values

75

Write a C++ program to find the common elements between two arrays

76

Write a C++ program to find the duplicate values of an array of integer values

77

Write a C++ program to find second largest number from the array

78

Write a C++ program to find second lowest number from the array

79

Write a C++ program to find the number of even and odd integers in a given array of integers

80

Write a C++ program to get the difference between the largest and smallest values in an array of integers

81

Write a C++ program to segregate all 0s on left side and all 1s on right side of a given array of 0s and 1s

82

Write a C++ program to cyclically rotate a given array clockwise by one

83

Write a C++ program to print all unique element in an array

84

Write a C++ Program to Sort the Array in an Ascending Order

85

Write a C++ Program to Sort the Array in an Descending Order

86

Write a C++ Program to Search Key Elements in an Array

87

Enter an array from user and display all the value ?

88

Enter an array from user and print the array in reverse order ?

89

Enter an array from user and copy the array into second array ?

90

Enter an array from user and copy it into another array in reverse order ?

91

Enter an array from user and print the number which is even ?

92

Enter an array from user and print the number which is positive ?

93

Enter an array from user and square all the values of array ?

94

Enter 5 values of array from user and print odd number of array ?

95

Enter 5 values of array from user and add all values ?

96

Enter 5 values of array from user, enter a value from user and search this value in array, if value is found then print “found” or not then print “not found”?

97

Enter five values of array and sort in ascending order ?

98

Find maximum values of array ?

99

Find minimum values of array ?