-
Notifications
You must be signed in to change notification settings - Fork 20k
In Maths folder Algorithm Added to solve Transpose of a matrix #2037
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
@@ -0,0 +1 @@ | |||
/.metadata/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add unwanted files filtering to .gitignore
/.metadata/ | |
/.metadata/ | |
*.classpath | |
*.project | |
.settings/* | |
*.class |
@@ -0,0 +1,35 @@ | |||
package TransposeOfMatrix; | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- Please add documentation as per documentation standards.
/** | |
* @author Rajat Jain | |
* Add something about the class here, like what it does etc. | |
*/ |
- Please format the code as per formatting and styling standards.
You can use Online Java Formatter if you like.
public class MainClass { | ||
|
||
public static void main(String[] args) { | ||
int original[][]={{1,3,4},{2,4,3},{3,4,5}}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please modularise this code by refactoring into a function that accepts an argument and returns the transposed result, so that this function can be used universally.
int transpose[][]=new int[3][3]; //3 rows and 3 columns | ||
|
||
//Code to transpose a matrix | ||
for(int i=0;i<3;i++){ | ||
for(int j=0;j<3;j++){ | ||
transpose[i][j]=original[j][i]; | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
int transpose[][]=new int[3][3]; //3 rows and 3 columns | |
//Code to transpose a matrix | |
for(int i=0;i<3;i++){ | |
for(int j=0;j<3;j++){ | |
transpose[i][j]=original[j][i]; | |
} | |
} | |
int transpose[][] = transposeMatrix(original); |
Sir can you please help me because it's my first try to solve any issue
through git .
Can you please help me?
And help me in the solving the issue or give me some advice to solve those
issues .
Please help me out
Thanks in advance
Best Regards
Rajat Jain
…On Fri, 20 Nov, 2020, 3:58 pm Aravinth Sundaram, ***@***.***> wrote:
***@***.**** requested changes on this pull request.
------------------------------
In Maths/.gitignore
<#2037 (comment)>:
> @@ -0,0 +1 @@
+/.metadata/
Please add unwanted files filtering to .gitignore
⬇️ Suggested change
-/.metadata/
+/.metadata/
+*.classpath
+*.project
+.settings/*
+*.class
------------------------------
In Maths/Transpose of a matrix/src/TransposeOfMatrix/MainClass.java
<#2037 (comment)>:
> @@ -0,0 +1,35 @@
+package TransposeOfMatrix;
+
- Please add documentation as per documentation standards.
- Please format the code as per formatting and styling standards.
------------------------------
In Maths/Transpose of a matrix/src/TransposeOfMatrix/MainClass.java
<#2037 (comment)>:
> @@ -0,0 +1,35 @@
+package TransposeOfMatrix;
+
+public class MainClass {
+
+ public static void main(String[] args) {
+ int original[][]={{1,3,4},{2,4,3},{3,4,5}};
Please modularise this code by refactoring into a function that accepts an
argument and returns the transposed result, so that this function can be
used universally.
------------------------------
In Maths/Transpose of a matrix/src/TransposeOfMatrix/MainClass.java
<#2037 (comment)>:
> + int transpose[][]=new int[3][3]; //3 rows and 3 columns
+
+ //Code to transpose a matrix
+ for(int i=0;i<3;i++){
+ for(int j=0;j<3;j++){
+ transpose[i][j]=original[j][i];
+ }
+ }
⬇️ Suggested change
- int transpose[][]=new int[3][3]; //3 rows and 3 columns
-
- //Code to transpose a matrix
- for(int i=0;i<3;i++){
- for(int j=0;j<3;j++){
- transpose[i][j]=original[j][i];
- }
- }
+ int transpose[][] = transposeMatrix(original);
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#2037 (review)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AP3U7PVEQTXJWBGU5ZMZQDDSQZAFZANCNFSM4T3DUFMA>
.
|
@@ -0,0 +1,35 @@ | |||
package TransposeOfMatrix; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
package TransposeOfMatrix; | |
package transposeOfMatrix; |
Hi @Rajat-Jain29, I have updated some of my comments and reviews to be more verbose. Please check them out, I believe it should help you. Please feel free to reach out. P.S. You can commit to the same branch and this PR will automatically be updated by your push. |
How can I contact you?
Can you please give me your contact number?
Please Sir
I am new in this Field...
…On Fri, 20 Nov, 2020, 4:44 pm Aravinth Sundaram, ***@***.***> wrote:
Sir can you please help me because it's my first try to solve any issue
through git . Can you please help me? And help me in the solving the issue
or give me some advice to solve those issues . Please help me out Thanks in
advance Best Regards Rajat Jain
… <#m_-3414043476260640969_>
Hi @Rajat-Jain29 <https://github.com/Rajat-jain29>,
I have updated some of my comments and reviews to be more verbose. Please
check them out, I believe it should help you. Please feel free to reach out.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#2037 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AP3U7PQDRHSXOQHT76XCCO3SQZFRVANCNFSM4T3DUFMA>
.
|
How to solve code formator / format (pull_request) checks ??
On Fri, 20 Nov, 2020, 4:22 pm Rajat Jain, <rajatjain.jain29@gmail.com>
wrote:
… Sir can you please help me because it's my first try to solve any issue
through git .
Can you please help me?
And help me in the solving the issue or give me some advice to solve those
issues .
Please help me out
Thanks in advance
Best Regards
Rajat Jain
On Fri, 20 Nov, 2020, 3:58 pm Aravinth Sundaram, ***@***.***>
wrote:
> ***@***.**** requested changes on this pull request.
> ------------------------------
>
> In Maths/.gitignore
> <#2037 (comment)>:
>
> > @@ -0,0 +1 @@
>
> +/.metadata/
>
>
> Please add unwanted files filtering to .gitignore
> ⬇️ Suggested change
>
> -/.metadata/
>
> +/.metadata/
>
> +*.classpath
>
> +*.project
>
> +.settings/*
>
> +*.class
>
>
> ------------------------------
>
> In Maths/Transpose of a matrix/src/TransposeOfMatrix/MainClass.java
> <#2037 (comment)>:
>
> > @@ -0,0 +1,35 @@
>
> +package TransposeOfMatrix;
>
> +
>
>
>
> - Please add documentation as per documentation standards.
> - Please format the code as per formatting and styling standards.
>
> ------------------------------
>
> In Maths/Transpose of a matrix/src/TransposeOfMatrix/MainClass.java
> <#2037 (comment)>:
>
> > @@ -0,0 +1,35 @@
>
> +package TransposeOfMatrix;
>
> +
>
> +public class MainClass {
>
> +
>
> + public static void main(String[] args) {
>
> + int original[][]={{1,3,4},{2,4,3},{3,4,5}};
>
>
> Please modularise this code by refactoring into a function that accepts
> an argument and returns the transposed result, so that this function can be
> used universally.
> ------------------------------
>
> In Maths/Transpose of a matrix/src/TransposeOfMatrix/MainClass.java
> <#2037 (comment)>:
>
> > + int transpose[][]=new int[3][3]; //3 rows and 3 columns
>
> +
>
> + //Code to transpose a matrix
>
> + for(int i=0;i<3;i++){
>
> + for(int j=0;j<3;j++){
>
> + transpose[i][j]=original[j][i];
>
> + }
>
> + }
>
>
> ⬇️ Suggested change
>
> - int transpose[][]=new int[3][3]; //3 rows and 3 columns
>
> -
>
> - //Code to transpose a matrix
>
> - for(int i=0;i<3;i++){
>
> - for(int j=0;j<3;j++){
>
> - transpose[i][j]=original[j][i];
>
> - }
>
> - }
>
> + int transpose[][] = transposeMatrix(original);
>
>
> —
> You are receiving this because you authored the thread.
> Reply to this email directly, view it on GitHub
> <#2037 (review)>,
> or unsubscribe
> <https://github.com/notifications/unsubscribe-auth/AP3U7PVEQTXJWBGU5ZMZQDDSQZAFZANCNFSM4T3DUFMA>
> .
>
|
#2041 duplicate PR |
This pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
Please reopen this pull request once you commit the changes requested or make improvements on the code. If this is not the case and you need some help, feel free to seek help from our Gitter or ping one of the reviewers. Thank you for your contributions! |
Solved it in a better way