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-09 08:55:06
java accept an integer from the user. Then indicate whether it is a perfect number or not.
public static void main(String[] args) { int n, sum = 0; Scanner s = new Scanner(System.in); System.out.print("Enter any integer you want to check:"); n = s.nextInt(); for(int i = 1; i < n; i++) ... Add solution -
Python 2021-10-08 21:31:07
ValueError: invalid literal for int() with base 10: site:stackoverflow.com
# Just for the record: int('55063.000000') Traceback (most recent call last): File "<stdin>", line 1, in <module> ValueError: invalid literal for int() with base 10: '55063.000000' # use this int(float('55063.000000')) Add solution
Best helpers
Ranking is empty