MakeContributions / DSA

Data Structure and Algorithm (DSA) contributions
MIT License
731 stars 772 forks source link

BUG in [Prims.java] #1281

Open KB2023ForGitHub opened 1 year ago

KB2023ForGitHub commented 1 year ago

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.

welcome[bot] commented 1 year ago

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

andysama79 commented 10 months ago

I am currently working on fixing this bug

MdialloC19 commented 10 months ago

Did you fixe this bug ?

andysama79 commented 10 months ago

yes i did

MdialloC19 commented 10 months ago

great

pushkarSingh9900 commented 6 months ago

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

MdialloC19 commented 6 months ago

ok let me review it