Skip to content

Changed imports #56

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions Magic_number.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,11 @@
//seperatly 1+2+3+4 =10 again adding the result 1+0= 1 if single digit //
//number is 1 then given number is magic number else not//

import java.io.;
import java.io.*;
class Magic_number
{
public static void main(String ar[])
public static void main(String ar[]) throws IOException
{

BufferedReader br = new BufferedReader (new InputStreamReader(System.in));
int n,v,t,d=0,s;
System.out.println("Enter the number");
Expand Down
11 changes: 3 additions & 8 deletions ReverseKrushkal.java
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ void addEdge(int v,int w)
adj[w].add(v);
}
void removeEdge(int v,int w){

for(int i=0;i<adj[v].size();i++){
int t=adj[v].get(i);
if(t==w){
Expand All @@ -28,10 +28,8 @@ void removeEdge(int v,int w){
if(t==v){
adj[w].remove(i);
}
}

}
}

boolean BFS(int s,int d)
{
boolean visited[] = new boolean[V];
Expand Down Expand Up @@ -82,7 +80,6 @@ public int compareTo(Edge compareEdge) {
for (int i=0; i<v; ++i)
adj[i] = new LinkedList<Integer>();
}

void ReverseKruskal(){

Edge result[]=new Edge[V];
Expand Down Expand Up @@ -117,9 +114,7 @@ public class ReverseKrushkal {
public static void main(String[] args) {
int V=6;
int E=8;




Graph graph=new Graph(V,E);

graph.edge[0].src=0;
Expand Down