Java Program to Generate All Possible Combinations of a Given List of Numbers

This is a java program to generate sequence of N characters randomly. Here is the source code of the Java Program to Generate a Sequence of N Characters for a Given Specific Case. The Java program is successfully compiled and run on a Windows system. The program output is also shown below.  // Specific case … Read more

advertisement

Java Program to Find ith Largest Element from a List using Order-Statistic Algorithm

This is a java program to find the ith largest element from a list using order-statistic algorithm. This version of the code uses quick sort partitioning technique. Here is the source code of the Java Program to Find ith Largest Number from a Given List Using Order-Statistic Algorithm. The Java program is successfully compiled and … Read more

advertisement

Java Program to Implement Heap’s Algorithm for Generating Permutations

This is a java program to find permutation of N numbers using Heap’s Algorithm. Heap’s algorithm is an algorithm used for generating all possible permutations of some given length. Here is the source code of the Java Program to Implement Heap’s Algorithm for Permutation of N Numbers. The Java program is successfully compiled and run … Read more

advertisement

Java Program to Implement Alexander Bogomolny’s UnOrdered Permutation Algorithm

This is a java program to implement Alexander Bogomolny’s permutation algorithm. This version of program computes all possible permutations of numbers from 1 to N using Alexander Bogomolyn’s algorithm. Here is the source code of the Java Program to Implement the Alexander Bogomolny’s UnOrdered Permutation Algorithm for Elements From 1 to N. The Java program … Read more

advertisement

Java Program to Generate a Random Subset by Coin Flipping

This is a java program to generate a random subset using coin flipping method. Coin is flipped, if is head(1), that element is in the subset else not in the subset. Here is the source code of the Java Program to Generate a Random Subset by Coin Flipping. The Java program is successfully compiled and … Read more

advertisement

Java Program to Generate Random Partition from Given Set

This is a java program to generate a random partitioning of a set of characters or numbers in to two sets. Randomly generate an index less than the total number of elements in the set. Here is the source code of the Java Program to Generate Random Partition out of a Given Set of Numbers … Read more

advertisement

Java Program to Generate All Pairs of Subsets whose Union Make the Set

This is a java program to generate and print all the pair of subsets whose union makes the original set. Here is the source code of the Java Program to Generate All Pairs of Subsets Whose Union Make the Set. The Java program is successfully compiled and run on a Windows system. The program output … Read more

advertisement

Java Program to Find the Mode in a Data Set

This is a java program to find the mode of a set. The mode of a set is defined as the highest occurring element in the set. We count the occurrence of each of the element and print the element whose count is highest. Here is the source code of the Java Program to Find … Read more

advertisement

Java Program to Generate All Possible Combinations of List of Numbers

This is a java program to generate and print all the permutation of the Numbers. User first enters the element in the set and then actual elements. The notion of permutation relates to the act of permuting, or rearranging, members of a set into a particular sequence or order (unlike combinations, which are selections that … Read more

advertisement

Java Program to Find the Number of Ways to Write a Number as the Sum of Numbers Smaller than Itself

This is a java program to find the number of ways to write a given number as sum of numbers less than the number itself. We start with the number, number minus one is the next partition and so on, till all one’s are the last partition where we stop. Here is the source code … Read more

advertisement
Subscribe to our Newsletters (Subject-wise). Participate in the Sanfoundry Certification contest to get free Certificate of Merit. Join our social networks below and stay updated with latest contests, videos, internships and jobs!

Youtube | Telegram | LinkedIn | Instagram | Facebook | Twitter | Pinterest
Manish Bhojasia - Founder & CTO at Sanfoundry
Manish Bhojasia, a technology veteran with 20+ years @ Cisco & Wipro, is Founder and CTO at Sanfoundry. He lives in Bangalore, and focuses on development of Linux Kernel, SAN Technologies, Advanced C, Data Structures & Alogrithms. Stay connected with him at LinkedIn.

Subscribe to his free Masterclasses at Youtube & discussions at Telegram SanfoundryClasses.