A function which calls itself until some condition is called recursive function. Soon we will add compiler to execute the Program below each method. Then the function minimum() So here, we make use of the scanner class to first read an integer number which is considered as the size of array (total number of Java Modulus/Mod using Scanner class. You can also use the Scanner class to get input from the user and draw a pyramid up to that level only. Time complexity of the above algorithm and program is O(m+n) where m and n are orders of two given polynomials.. Auxiliary Space: O(max(m, n)) This article is contributed by Harsh. Java Program to Print Odd Numbers from 1 to N Example 1. This kind of method is not efficient at all. Inverted Right Triangle. Java program to print or calculate addition of two numbers with sample outputs and example programs. 2) If the length of string s1 is not equal to the length of string s2 then the function stringcompare() returns 0. 3) Find the repeated elements in the array for loop iterates from i=0 i