Problem 45491. cross-section of 3D pyramid
Create 3d pyramid of ones and zeros...where pyramid-part is denoted by ones and outer-part is denoted by zeros..where base is square-shaped.. now show the the CROSS-SECTION of the pyramid on the XZ plane...input n is the side of the square base of the pyramid..
input= 3 output= 0 1 0 1 1 1
Solution Stats
Problem Comments
-
2 Comments
faulty test suite plz correct
Just looking at the test suite we can figure out. But the author once again is dealing with the same abstract pyramid. And that's the best problem description made by the author: kudos. This time we are looking at the pyramid through its side view.
Solution Comments
Show commentsProblem Recent Solvers21
Suggested Problems
-
Return the largest number that is adjacent to a zero
5205 Solvers
-
Sort a list of complex numbers based on far they are from the origin.
5545 Solvers
-
3334 Solvers
-
225 Solvers
-
Matrix multiplication across rows
307 Solvers
More from this Author2
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!