| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
|
Hi, thank you for your interest in the Algorithm Archive! However, the first step of admissibility is not yet reached: you need to get your code to compile on a Docker Ubuntu-based environment, which, as I am writing this, just failed. contents/flood_fill/code/java/main.java:5: error: cannot find symbol
flood_fill f = new flood_fill();
^
symbol: class flood_fill
location: class main
contents/flood_fill/code/java/main.java:5: error: cannot find symbol
flood_fill f = new flood_fill();
^
symbol: class flood_fill
location: class main
contents/flood_fill/code/java/main.java:6: error: cannot find symbol
Point start = new Point(0,0);
^
symbol: class Point
location: class main
contents/flood_fill/code/java/main.java:6: error: cannot find symbol
Point start = new Point(0,0);
^
symbol: class Point
location: class main
Please fix it, so we can review and eventually merge your code in. |
Sorry, something went wrong.
|
Hi, |
Sorry, something went wrong.
|
Thank you for the reactivity (relative to timezones, of course)! |
Sorry, something went wrong.
There was a problem hiding this comment.
I checked your code before going to sleep, and it was empty.
Apparently your last commit truncated your flood_fill.java file, and outright deleted your Main.java file.
Please fix that, so we can review your code
Sorry, something went wrong.
|
Hi, |
Sorry, something went wrong.
There was a problem hiding this comment.
Okay, so while I'm not a Java specialist, the code was clear enough for me to approve it. I would ask for a second opinion, but I don't know anyone who is comfortable enough reviewing Java code :/
The only thing that annoys me is your package thing, but apart from that, I have nothing to say about the code.
Sorry, something went wrong.
| if (p.x < 0 || p.x >= row || p.y < 0 || p.y >= col) return false; | ||
| return true; |
There was a problem hiding this comment.
maybe you can just do:
| if (p.x < 0 || p.x >= row || p.y < 0 || p.y >= col) return false; | |
| return true; | |
| return (p.x < 0 || p.x >= row || p.y < 0 || p.y >= col); |
Sorry, something went wrong.
There was a problem hiding this comment.
sorry, wrong call: it was missing a ! operator before the parenthesis...
Sorry, something went wrong.
Co-authored-by: Sammy Plat <sammy@sammyplat.fr>
There was a problem hiding this comment.
So, since you didn't respond to my last few comments, here is a new review.
Since you removed one line when removing the if statement in inbound(), you'll need to adjust the line numbers as well.
Looking forward to your next commit.
Sorry, something went wrong.
| } | ||
| public static boolean inbound(int[][] grid, Point p){ | ||
| int row = grid.length, col = grid[0].length; | ||
| return (p.x < 0 || p.x >= row || p.y < 0 || p.y >= col); |
There was a problem hiding this comment.
Sorry I mislead you earlier, this should be the correct way:
| return (p.x < 0 || p.x >= row || p.y < 0 || p.y >= col); | |
| return !(p.x < 0 || p.x >= row || p.y < 0 || p.y >= col); |
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
add java code for implementation of flood fill