Build a Wall

Create the strongest wall of all time by combining bricks in the right way.
Most of us were playing with Lego (or even better, Tente) when we were children, and we know how complex it is to build something strong that doesn't fall down when you have to add something heavy above, right?


We had discovered, after many times and frustration, that the bricks for any wall have to be well-placed among each others to achieve a really strong wall.


So, the aim of this Challenge is to create the strongest wall of all time! You will have to combine bricks, in a proper way, to avoid instability.

HOW IT WORKS

This is a CLI application that receives 2 arguments and represent the created wall in ASCII, easy-peasy, isn't it? Well, let's see...

To do so, your CLI command have to receive the following parameters:

  • Number of rows: The number of rows of bricks the wall has to have
  • Number of bricks: The number of bricks you have to use on each row to represent the wall

Ideal for

Middle & Senior developers

Available stacks

Java · PHP · TypeScript · JavaScript

Required experience

Mid-level knowledge

HOW TO REPRESENT YOUR WALL

To represent your one-and-only creation you have to use the following elements:

  • ■■: A full brick (2 of ). The bigger brick for the wall
  • : Half a brick. The smallest unit
  • |: Mortar. The cement between each brick on the same row
HOW TO BUILD A STRONG WALL

Any builder knows that, if you just put a brick over another, your wall is going to fall down as you turn your
back!

To build a strong wall you have to follow these considerations:

  • There has to be a mortar (|) every brick (half or full) on the same row
  • Bricks cannot be aligned vertically with the bricks of the row above or below it, to provide more stability

EXAMPLES

Here you could see some examples of the expected output:

{{content}}gt; build 5 5

{{content}}gt; build 10 7

{{content}}gt; build "eight" [3]
null


{{content}}gt; build 12 -4
null


{{content}}gt; build 123 1024
Naah, too much...here's my resignation.

HOW IT WORKS
  • Solve the challenge and show your potential
  • Defend your solution by explaining your code.
  • Get feedback on your code from experts.
  • Build your technical portfolio with all your completed challenge 
WHAT WILL YOU GET
  • Create an app and test your coding skills
  • Feedback from our expert Tech Mentors
  • A complete report of your skills - with the possibility of sharing it
  • Your own technical portfolio to use in job interviews

ABOUT THE CREATOR

Schaman

This challenge has been created by the technical team of Schaman, a tech startup that is revolutionizing customer support, obtaining differential values of efficiency and customer satisfaction.

To do so, they automatically create personalized attention flows that detect the root cause of the problem with minimum dependence on customer interaction, and at the same time allow preventing it in the future. 

The team of engineers in charge of creating this challenge is responsible for the construction of Schaman.

Start now this Build a Wall challenge

Ready to challenge yourself and build something you're proud of?

More coding challenges

Front-end
Memory Game
Create your own Memory Game based on pairs of cards.
deliverapp
4 h
  • Android
  • iOS
  • Junior
  • Middle
  • Senior
Difficulty Medium
Blockchain
Cartfidential
Create an e-commerce shopping cart based on Blockchain, executing and storing processes in a decentralized way.
deliverapp
3 h
  • Python
  • Java
  • JavaScript
  • Typescript
  • Middle
Difficulty Intermediate
Blockchain
Eurovoting System
Build a new voting system with Blockchain, providing a decentralized database and ensuring the immutability of the data.
deliverapp
3 h
  • Python
  • JavaScript
  • Typescript
  • Java
  • Senior
Difficulty Advanced

The #BlockchainCodeathon is here 🔥! Solve a Blockchain challenge, get feedback on your code from experts and win awesome prizes!