Skip to content
This repository was archived by the owner on May 29, 2024. It is now read-only.
This repository was archived by the owner on May 29, 2024. It is now read-only.

BUG in [Prims.java] #1281

@KB2023ForGitHub

Description

@KB2023ForGitHub

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions