What do you want to save?
Add Code snippet
New code examples
-
Java 2021-09-13 03:39:01
ConcurrentModificationException fix
//Occurs when trying to remove an element from a Collection //while iterating over it //Where removal takes place //Setup an iterator Iterator<Thing> iter = things.iterator(); //Iterate over collection while(iter.hasNext()) { Thing thing = iter.ne... Add solution -
TypeScript 2021-09-13 02:08:02
count the number of digits in an integer in java
import java.util.Scanner; public class CountingDigitsInInteger { public static void main(String args[]){ Scanner sc = new Scanner(System.in); int count = 0; System.out.println(&qu... Add solution -
Java 2021-09-12 15:20:04
java code to play stone paper scissors
import java.util.Scanner; class Stone_Paper_Scissors { public static void main(String[] args) { Scanner in = new Scanner(System.in); System.out.println("Welcome to Rock, Paper, Scissors!"); while(true) { System.out.print("... Add solution -
Other 2021-09-12 12:57:03
bangladesh map
#include <stdio.h> int main() { char str[] = "ED..GDAD..DLEB..COCC..CV..FS..HQ..JN..MP..Go..Cr..Cq..Cp..Fk..Jf..J`..I`..H`ID..J^HE..K^FG..N[ABCG..L`CG..MTBT..MUCS..NTDBCBAJ..NUBBHI..OTMI..OROI..OGDCSI..PE[I..RC[I..rBDB..rB..sB..tB... Add solution -
C++ 2021-09-12 02:36:04
cpp stack
#include <iostream> using namespace std; int stack[100], n=100, top=-1; void push(int val) { if(top>=n-1) cout<<"Stack Overflow"<<endl; else { top++; ... Add solution -
C++ 2021-09-12 01:55:01
how to read a comma delimited file into an array c++
#include <fstream> #include <sstream> #include <iostream> #include <vector> int main() { std::ifstream inFile("registration.txt"); if (inFile.is_open()) { std::string line; while( std::getline... Add solution -
Java 2021-09-11 11:14:03
java bucket sort
public static int[] bucketSort(int[] a) { Queue<Integer>[] buckets = fillBuckets(a); int[] sorted = readBuckets(buckets); return sorted; } public static Queue<Integer>[] fillBuckets(int[] array) { if(array.length == 0){ Queue<I... Add solution -
Java 2021-09-11 10:33:03
TreeSet iterator() method in java
import java.util.Iterator; import java.util.TreeSet; public class TreeSetIteratorMethodExample { public static void main(String[] args) { TreeSet<Integer> ts = new TreeSet<Integer>(); ts.add(23); ts.add(52); ts.ad... Add solution -
C 2021-09-11 08:23:04
reverse a singly linked list in c
/** * C program to reverse a Singly Linked List */ #include <stdio.h> #include <stdlib.h> /* Structure of a node */ struct node { int data; //Data part struct node *next; //Address part }*head; /* Functions used in the program *... Add solution
Best helpers
Ranking is empty