Skip to content

Conversation

@Connie-bread
Copy link

version 1

Copy link
Collaborator

@Tortuga-AM Tortuga-AM left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well done! Overall really good. Left a couple style changes or recommendations. No need to implement them just for reference.

*/
public static int[] fizzbuzz(int[] arr) {
return null;
int [] array = {0, 0, 0};
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Common practice is int[]

return null;
int [] array = {0, 0, 0};
for (int num : arr) {
if (num % 3 == 0 && num % 5 == 0) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Recommend more parentheses for clarity

// Your code goes here
return false;
boolean prime = true;
for (double i = 2; i <= Math.sqrt(n); i++) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

int i = 2;

boolean prime = true;
for (double i = 2; i <= Math.sqrt(n); i++) {
if (n % i == 0) {
prime = false;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can return prime here because you know it's value

Comment on lines 62 to 66
boolean cd1 = false;
boolean cd2 = false;
boolean cd3 = false;
boolean cd4 = false;
boolean cdLength = false;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Recommend better variable names

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants