Sort 69 Discussions, By:

Sorry, you do not have a permission to answer to this question.

  • Cypher 7 years ago + 2 comments

    only first 4 test cases passed. :( don't know what to do

    Add Reply Preview cancel

    Sorry, you do not have a permission to answer to this question.

    • kalpan2713 7 years ago + 2 comments

      same here bro.. any suggestion??

      Add Reply Preview cancel

      Sorry, you do not have a permission to answer to this question.

      • vishwasvrockstar 7 years ago + 0 comments

        try using 2d matrix of size n fill the matrix and print it..test it against huge values of n ...u may just gt to know wer u r goin wrong.

        Add Reply Preview cancel

        Sorry, you do not have a permission to answer to this question.

        • amitrajitbose9 7 years ago + 1 comment

          I would recommend you to think that you are creating layers of matrix of n order, then (n-1) order, then (n-2) order and so on. Start from the periphery and reach the epicentre.

          Creating the final two dimensional array is the main aim. Rest is a piece of cake.

          Add Reply Preview cancel

          Sorry, you do not have a permission to answer to this question.

          • Cypher 7 years ago + 0 comments

            did same and nailed it:)

            Add Reply Preview cancel

            Sorry, you do not have a permission to answer to this question.

        • ayushparasar5 7 years ago + 0 comments

          you might want to check yourself. Try and print the whole 2D array and see for yourself where you're going wrong.

          Add Reply Preview cancel

          Sorry, you do not have a permission to answer to this question.

        • Santiftw 7 years ago + 1 comment

          Can I use numpy on python?

          Add Reply Preview cancel

          Sorry, you do not have a permission to answer to this question.

          • brexe 7 years ago + 1 comment

            yes

            Add Reply Preview cancel

            Sorry, you do not have a permission to answer to this question.

            • Santiftw 7 years ago + 1 comment

              Got this problem

              Traceback (most recent call last): File "solution.py", line 4, in import numpy as np ImportError: No module named 'numpy'

              Add Reply Preview cancel

              Sorry, you do not have a permission to answer to this question.

              • brexe 7 years ago + 0 comments

                yeah that means we can't use numpy. maybe we can use just in some contests...

                Add Reply Preview cancel

                Sorry, you do not have a permission to answer to this question.

          • AbduAziz 7 years ago + 3 comments

            Check for this input: 5 4 0 0 4 4 0 4 0 4 4 4 4 4 Answer should be 8.

            Add Reply Preview cancel

            Sorry, you do not have a permission to answer to this question.

            • AnirudhMurali 7 years ago + 0 comments

              Getting 8, the sample input I gave works too. Yet, 4 testcases.

              Add Reply Preview cancel

              Sorry, you do not have a permission to answer to this question.

              • chaudhary__jr 7 years ago + 0 comments

                Thanks the test case helped me!

                Add Reply Preview cancel

                Sorry, you do not have a permission to answer to this question.

                • DriftedHawk49 7 years ago + 1 comment

                  I got 8 too , sir , But only 4 test cases are being completed. :()

                  Add Reply Preview cancel

                  Sorry, you do not have a permission to answer to this question.

                  • AbduAziz 7 years ago + 1 comment

                    What about 4 4 0 0 4 0 0 4 1 1 4 1 1 4 ? Answer is 14.

                    Add Reply Preview cancel

                    Sorry, you do not have a permission to answer to this question.

                    • nir99 7 years ago + 0 comments

                      isn't answer is 6 ?

                      Add Reply Preview cancel

                      Sorry, you do not have a permission to answer to this question.

                • mittal_aayush26 7 years ago + 0 comments

                  can anyone tell me what are the test cases 4,5,... For this problem?

                  Add Reply Preview cancel

                  Sorry, you do not have a permission to answer to this question.

                  • 15B01A0536 7 years ago + 2 comments

                    I am getting only first three testcases correct can anyone help me.

                    Add Reply Preview cancel

                    Sorry, you do not have a permission to answer to this question.

                    • shubham_mahawar 7 years ago + 1 comment

                      same here bro

                      Add Reply Preview cancel

                      Sorry, you do not have a permission to answer to this question.

                      • shubham_mahawar 7 years ago + 0 comments

                        have you find out the way?

                        Add Reply Preview cancel

                        Sorry, you do not have a permission to answer to this question.

                      • ameyanator 7 years ago + 1 comment

                        Had the same mistake found the bug in my code.

                        Step by step analysis of the 2nd test case gave the answer

                        Add Reply Preview cancel

                        Sorry, you do not have a permission to answer to this question.

                        • shubham_mahawar 7 years ago + 0 comments

                          ok thanx

                          Add Reply Preview cancel

                          Sorry, you do not have a permission to answer to this question.

                      1. Challenge Walkthrough
                        Let's walk through this sample challenge and explore the features of the code editor.1 of 6
                      2. Review the problem statement
                        Each challenge has a problem statement that includes sample inputs and outputs. Some challenges include additional information to help you out.2 of 6
                      3. Choose a language
                        Select the language you wish to use to solve this challenge.3 of 6
                      4. Enter your code
                        Code your solution in our custom editor or code in your own environment and upload your solution as a file.4 of 6
                      5. Test your code
                        You can compile your code and test it for errors and accuracy before submitting.5 of 6
                      6. Submit to see results
                        When you're ready, submit your solution! Remember, you can go back and refine your code anytime.6 of 6
                      1. Check your score