mirror of
https://github.com/TheAlgorithms/Java.git
synced 2025-07-19 17:54:42 +08:00
Many quality of code changes
Removing unused imports, cleaning up (at a base level) code, and removing some package declarations. By no means did I get all of them.
This commit is contained in:
@ -12,6 +12,6 @@ class Abecedarian{
|
||||
|
||||
else{return false;}
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
@ -4,6 +4,11 @@
|
||||
*/
|
||||
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.Arrays;
|
||||
import java.util.Scanner;
|
||||
import java.util.Stack;
|
||||
|
||||
public class Solution {
|
||||
|
||||
public static void main(String[] args) throws IOException {
|
||||
@ -30,7 +35,7 @@ public static void main(String[] args) throws IOException {
|
||||
|
||||
//Implementing Dijkshtra's Algorithm
|
||||
|
||||
Stack <Integer> t=new Stack<Integer>();
|
||||
Stack<Integer> t=new Stack<Integer>();
|
||||
int src=in.nextInt();
|
||||
for(int i=1;i<=n;i++){
|
||||
if(i!=src){t.push(i);}}
|
||||
|
@ -1,4 +1,3 @@
|
||||
package factorial;
|
||||
import java.util.Scanner;
|
||||
|
||||
/**
|
||||
|
@ -1,6 +1,5 @@
|
||||
import java.util.Scanner;
|
||||
|
||||
|
||||
public class FloydTriangle {
|
||||
public static void main(String[] args) {
|
||||
Scanner sc = new Scanner(System.in);
|
||||
|
@ -67,8 +67,4 @@ public class ReverseStackUsingRecursion {
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
@ -39,7 +39,7 @@ class ReverseString
|
||||
BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
|
||||
System.out.println("Enter the string");
|
||||
String srr=br.readLine();
|
||||
System.out.println("Reverse="+reverseString(srr));
|
||||
System.out.println("Reverse="+reverse(srr));
|
||||
br.close();
|
||||
}
|
||||
}
|
||||
|
@ -1,4 +1,5 @@
|
||||
import java.util.Scanner;
|
||||
|
||||
class krishnamurthy
|
||||
{
|
||||
int fact(int n)
|
||||
|
@ -1,8 +1,4 @@
|
||||
import java.io.*;
|
||||
import java.util.*;
|
||||
import java.text.*;
|
||||
import java.math.*;
|
||||
import java.util.regex.*;
|
||||
|
||||
public class Solution {
|
||||
|
||||
|
Reference in New Issue
Block a user