Skip to content

solution and test for problem #14#93

Open
rkalra247 wants to merge 1 commit intollipio:masterfrom
rkalra247:problem14
Open

solution and test for problem #14#93
rkalra247 wants to merge 1 commit intollipio:masterfrom
rkalra247:problem14

Conversation

@rkalra247
Copy link
Copy Markdown
Contributor

No description provided.

Comment thread solutions/14.js
for(let j = 0; j < array.length; j++){
if(i === j){
newArray.push(array[i][j]);
}
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

indentation

Comment thread solutions/14.js
// Rahul Kalra
// Return an array of the diagnal values starting from 0,0 from a 2D array input(gauranteed to be square).

const solution = (array) =>{
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

don't use array as a variable name. call it input

Comment thread solutions/14.js
@@ -0,0 +1,17 @@
// Rahul Kalra
// Return an array of the diagnal values starting from 0,0 from a 2D array input(gauranteed to be square).
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Please write proper comments, like here: https://github.com/llipio/algorithms/pull/75/files

Comment thread solutions/14.js
@@ -0,0 +1,17 @@
// Rahul Kalra
// Return an array of the diagnal values starting from 0,0 from a 2D array input(gauranteed to be square).
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

@rkalra247, please make sure there is no typo in comment, and add comments like this: https://github.com/llipio/algorithms/pull/55/files

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.

3 participants