Atlantbh Code Challenge

Atlantbh Code Challenge
Atlantbh, Bosnia and Herzegovina

Experience
1 Year
Salary
0 - 0
Job Type
Job Shift
Job Category
Traveling
No
Career Level
Telecommute
No
Qualification
As mentioned in job details
Total Vacancies
1 Job
Posted on
Jan 19, 2023
Last Date
Feb 19, 2023
Location(s)

Job Description

Solve this task and come visit us! The first three people who send us the correct solution will get a chance to meet our Talent team, visit the Atlantbh office* and receive a gift! Read this blog and take on the challenge!

Atlantbh does not cover the cost of transportation to the office.

Requirements

We are renovating our office and want to build a few pillars. You will be given lego blocks (each has the same height and width). Each pillar must be higher than previously built pillars, meaning each pillar must contain a unique number of blocks. If given N number of pillars, how many different combinations of pillars with different heights can you build?

Hint 1: If you are given 5 lego blocks, you can build two pillars with different heights, 2 and 3, OR two pillars with heights 1 and 4. So the number of COMBINATIONS is 2.

Hint 2: if you are given 6 lego blocks, you can build two pillars with heights 1 and 5, two pillars with heights 2 and 4, or three pillars with heights 1, 2, and 3. The number of COMBINATIONS is 3.

You need to write a function count_pillars(n) in any programming language, which takes n as the number of lego blocks and retrieves the number of possible combinations of pillars for the given number of blocks.

You need to provide two solutions.
First must be written using recursion.

In the second, use dynamic programming based on the first solution. The maximum number of lego blocks in test cases will be 300 000.

If you know the solution, send it to us in the desired programming language. Don’t forget to explain your logic in solving this task. Good luck!

Benefits

Challenge yourself
Get familiar with the Atlantbh office
Ask a question, (almost) any question - and our Talent team will gladly answer
Bring home a gift

Job Specification

Job Rewards and Benefits

Atlantbh

Information Technology and Services - Sarajevo, Bosnia and Herzegovina
Β© Copyright 2004-2024 Mustakbil.com All Right Reserved.