MakeContributions / DSA

Data Structure and Algorithm (DSA) contributions

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

BUG in [Prims.java]

KB2023ForGitHub opened this issue · comments

Bug detail
algorithms/{Java}/{graphs}/{Prims}
In line 55 in the code, it is written "for(i =;i<=n;i++)" instead of "for(int i =;i<=n;i++)". Also for lines 37-52, variables u and v are not initialized. There could be many more errors, but I am not sure. I only realized that u an v are not initialized after I changed "for(i =;i<=n;i++)" into "for(int i =;i<=n;i++)".

Counter example

I can't give a counter example because the code won't run.

Additional context

Prims.java is not the only file that won't run. There are many other files in the Java folder that contain errors that won't allow the programs to run. I am not sure about other files for other programming languages. I am running everything on Visual Studio Code and I had to download an extension pack for Java from Microsoft — as well as a Java Development Kit from Adoptium — in order to run any Java file. I don't think the errors I am experiencing has to do with Visual Studio Code, the extension, or the kit because when I run the code after getting rid of the problem areas or modifying it in some way, it runs fine.

Thanks for opening your first issue here! Be sure to follow the issue template!

I am currently working on fixing this bug

Did you fixe this bug ?

yes i did

great

hello,
there were some more bugs in java, i fixed them and they are in the pull request, is it possible for anyone to approve them?
thank you

ok let me review it