0% found this document useful (0 votes)
9 views

Assignement Questions of Programming - DSA

The document lists various programming problems categorized into four main sections: Arrays, Numbers, Number System, Sorting, and String. Each section contains multiple problems that focus on different algorithms and operations, such as finding elements, sorting, and string manipulation. This comprehensive collection serves as a resource for practicing programming skills across different topics.
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
9 views

Assignement Questions of Programming - DSA

The document lists various programming problems categorized into four main sections: Arrays, Numbers, Number System, Sorting, and String. Each section contains multiple problems that focus on different algorithms and operations, such as finding elements, sorting, and string manipulation. This comprehensive collection serves as a resource for practicing programming skills across different topics.
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 4

PROGRAMS

Problems on Arrays
1. Find the smallest number in an array

2. Find the largest number in an array

3. Second Smallest and Second Largest element in an array

4. Reverse a given array

5. Count frequency of each element in an array

6. Rearrange array in increasing-decreasing order

7. Calculate sum of the elements of the array

8. Rotate array by K elements - Block Swap Algorithm

9. Average of all elements in an array

10. Find the median of the given array

11. Remove duplicates from a sorted array

12. Remove duplicates from unsorted array

13. Adding Element in an array

14. Find all repeating elements in an array

15. Find all non-repeating elements in an array

16. Find all symmetric pairs in array

17. Maximum product subarray in an array

18. Replace each element of the array by its rank in the array

19. Sorting elements of an array by frequency

20. Rotation of elements of array- left and right

21. Finding equilibrium index of an array

22. Finding Circular rotation of an array by K positions

23. Sort an array according to the order defined by another array

24. Search an element in an array

25. Check if Array is a subset of another array or not

Problems on Numbers
1. Check if a number is palindrome or not

2. Find all Palindrome numbers in a given range

3. Check if a number is prime or not

4. Prime numbers in a given range

5. Check if a number is armstrong number of not

6. Check if a number is perfect number

7. Even or Odd

8. Check weather a given number is positive or negative

9. Sum of first N natural numbers

10. Find Sum of AP Series

11. Program to find sum of GP Series

12. Greatest of two numbers

13. Greatest of three numbers

14. Leap Year or not

15. Reverse digits of a number

16. Maximum and Minimum digit in a number

17. Print Fibonacci upto Nth Term

18. Factorial of a number

19. Power of a number

20. Factors of a given number

21. Print all prime factors of the given number

22. Check if a number is a strong number or not

23. Check if a Number is Automorphic

24. GCD of two numbers

25. LCM of two numbers

26. Check if a number is Harshad number

27. Check if the number is abundant number or not

28. Sum of digits of a number

29. Sum of numbers in the given range


30. Permutations in which N people can occupy R seats in a classroom

31. Program to add two fractions

32. Replace all 0s with 1s in a given integer

33. Can a number be expressed as a sum of two prime numbers

34. Calculate the area of circle

35. Program to find roots of a Quadratic Equation

Problems on Number System


1. Convert Binary to Decimal

2. Convert binary to octal

3. Decimal to Binary conversion

4. Convert decimal to octal

5. Convert octal to binary

6. Convert octal to decimal

7. Convert digits/numbers to words

Problems on Sorting
1. Bubble Sort Algorithm

2. Selection Sort Algorithm

3. Insertion Sort Algorithm

4. Quick Sort Algorithm

5. Merge sort algorithm

Problems on String
1. Check if a given string is palindrome or not

2. Count number of vowels, consonants, spaces in String

3. Find the ASCII value of a character

4. Remove all vowels from the string

5. Remove spaces from a string

6. Remove characters from a string except alphabets

7. Reverse a String
8. Remove brackets from an algebraic expression

9. Sum of the numbers in a String

10. Capitalize first and last character of each word

11. Calculate frequency of characters in a string

12. Find Non-repeating characters of a String

13. Check if two strings are anagram of each other

14. Count common sub-sequence in two strings

15. Check if two strings match where one string contains wildcard characters

16. Return maximum occurring character in the input string

17. Remove all duplicates from the input string.

18. Print all the duplicates in the input string.

19. Remove characters from first string present in the second string

20. Change every letter with the next lexicographic alphabet in the given string

21. Write a program to find the largest word in a given string.

22. Write a program to sort characters in a string

23. Count number of words in a given string

24. Write a program to find a word in a given string which has the highest number
of repeated letters

25. Change case of each character in a string

26. Concatenate one string to another

27. Write a program to find a substring within a string. If found display its starting
position

28. Reverse words in a string

You might also like