What do you want to save?
Add Code snippet
New code examples
-
Java 2021-10-09 17:10:08
minimum swaps to sort an array
import java.io.*; import java.math.*; import java.util.*; public class Swap { static int minimumSwaps(int[] arr) { int swap=0; boolean visited[]=new boolean[arr.length]; for(int i=0;i<arr.length;i++){ int j=i,cycle=0; while(!visited[j])... Add solution -
Java 2021-10-08 16:07:08
string code
// Java code to illustrate different constructors and methods // String class. import java.io.*; import java.util.*; class Test { public static void main (String[] args) { String s= "GeeksforGeeks"; // or String s= new String ("Geeks... Add solution -
Java 2021-09-29 02:46:04
java export system out to string
// Java program to demonstrate redirection in System.out.println() import java.io.*; public class SystemFact { public static void main(String arr[]) throws FileNotFoundException { // Creating a File object that represents the disk file.... Add solution -
Java 2021-09-26 17:59:03
search engine using java example
import java.util.*; import java.io.*; public class SearchEngine{ public static void main(String[] args){ Hashtable<String, ArrayList<String> > ht = new Hashtable<String, ArrayList<String> >(); Scanner kb = new Scanner(System.... Add solution -
Java 2021-09-22 12:41:03
java code to right rotate an array
import java.util.*; import java.lang.*; import java.io.*; /* Name of the class has to be "Main" only if the class is public. */ class Codechef { public static void main (String[] args) { Scanner sc=new Scanner(System.in); // your code... Add solution
Best helpers
Ranking is empty