Top 100 Codes

PrepInsta Top 100 Codes

Below You will find some of the most important codes in languages like C, C++ and Java. These codes are of prime importance for college semester exams and also for various online tests and interviews of the companies offering placements within varying range in LPA.

These codes are very important since these will help you clear your basic concepts in various languages.

coding (3)
  • Highest Common Factor(HCF): C | C++Java | Python
  • Lowest Common Multiple (LCM) : C | C++ | Java | Python
  • Greatest Common Divisor : C | C++ | Java | Python
  • Binary to Decimal to conversion : C | C++ | Java | Python
  • Binary to Octal conversion : C | C++ | Java  | Python
  • Decimal to Binary conversion: C | C++ | Java | Python
  • Decimal to octal Conversion: C | C++ | Java | Python
  • Octal to Binary conversion : C | C++ | Java | Python
  • Octal to Decimal conversion : C | C++ | Java | Python
  • Quadrants in which a given coordinate lies : C | C++ | Java | Python
  • Permutations in which n people can occupy r seats in a classroom : C | C++ | Java | Python
  • Maximum number of handshakes: C | C++ | Java | Python
  • Addition of two fractions: C | C++ | Java | Python
  • Replace all 0’s with 1 in a given integer : C | C++ | Java
  • Can a number be expressed as a sum of two prime numbers : C | C++ | Java | Python
  • Count possible decoding of a given digit sequence : C | C++ | Java
  • Check whether a character is a vowel or consonant : C | C++ | Java | Python
  • Check whether a character is a alphabet or not : C | C++ | Java
  • Calculate the area of a circle : C | C++ | Java
  • Find the ASCII value of a character : C | C++ | Java | Python
  • Find the prime numbers between 1 to 100 : C | C++ | Java
  • Calculate the number of digits in an integer : C | C++ | Java | Python
  • Convert digit/number to words : C | C++ | Java | Python
  • Counting number of days in a given month of a year: C | C++ | Java | Python
  • Finding Number of times x digit occurs in each and every number from 0 to n : C | C++ | Java | Python
  • Finding number of integers which has exactly x divisors: C | C++ | Java | Python
  • Finding Roots of a quadratic equation : C | C++ | Java | Python

Important Codes related to Arrays

  • Find Smallest Element in an Array : C | C++ | Java | Python
  • Find Second Smallest Element in an Array : C | C++ | Java | Python
  • Find Largest element in an array : C | C++ | Java | Python
  • Find the Smallest and largest element in an array : C | C++ | Java | Python
  • Calculate the sum of elements in an array : C | C++ | Java | Python
  • Reverse an Array : C | C++ | Java | Python
  • Sort first half in ascending order and second half in descending : C | C++ | Java | Python
  • Sort the elements of an array : C | C++ | Java | Python
  • Finding the frequency of elements in an array : C | C++ | Java | Python
  • Finding the Longest Palindrome in an Array : C | C++ | Java| Python
  • Counting Distinct Elements in an Array : C | C++ | Java| Python
  • Finding  Repeating elements in an Array : C | C++ | Java
  • Finding Non Repeating elements in an Array : C | C++ | Java
  • Removing Duplicate elements from an array : C | C++ | Java
  • Finding Minimum scalar product of two vectors : C | C++ | Java
  • Finding Maximum scalar product of two vectors in an array : C | C++ | Java
  • Counting the number of even and odd elements in an array : C | C++ | Java
  • Find all Symmetric pairs in an array : C | C++ | Java
  • Find maximum product sub-array in a given array : C | C++ | Java
  • Finding Arrays are disjoint or not : C | C++ | Java
  • Determine Array is a subset of another array or not : C | C++ | Java
  • Determine can all numbers of an array be made equal : C | C++ | Java
  • Finding Minimum sum of absolute difference of given array : C | C++ | Java
  • Sorting elements of an array by frequency : C | C++ | Java
  • Sort an array according to the order defined by another array : C | C++ | Java
  • Replace each element of the array by its rank in the array : C | C++ | Java
  • Finding equilibrium index of an array : C | C++ | Java| Python
  • Rotation of elements of array- left and right : C | C++ | Java| Python
  • Block swap algorithm for array rotation : C | C++ | Java| Python
  • Juggling algorithm for array rotation : C | C++ | Java | Python
  • Finding Circular rotation of an array by K positions : C | C++ | Java | Python

You can find the below Programs in all languages

array
Operations on Strings

Operations on Strings

  • Length of the string without using strlen() function : C | C++ | Java | Python
  • Toggle each character in a string : C | C++ | Java | Python
  • Count the number of vowels : C | C++ | Java | Python
  • Remove the vowels from a String : C | C++ | Java | Python
  • Check if the given string is Palindrome or not : C | C++ | Java | Python
  • Print the given string in reverse order : C | C++ | Java | Python
  • Remove all characters from string except alphabets : C | C++ | Java | Python
  • Remove spaces from a string : C | C++ | Java | Python
  • Remove brackets from an algebraic expression : C | C++ | Java | Python
  • Count the sum of numbers in a string : C | C++ | Java | Python
  • Capitalize the first and last character of each word of a string : C | C++ | Java | Python
  • Calculate frequency of characters in a string : C | C++ | Java | Python
  • Find non-repeating characters in a string : C | C++ | Java | Python
  • Check if two strings are Anagram or not : C | C++ | Java | Python
  • Replace a sub-string in a string: C | C++ | Java | Python
  • Count common sub-sequence in two strings : C | C++ | Java | Python
  • Check if two strings match where one string contains wildcard characters : C | C++ | Java | Python

Pattern Printing

Visit PrepInsta Pattern printing Tutorial Dashboard here

array