6 kyu

Zig-Zag Camel

83 of 259dinglemouse

Description:

A camel at the base of a large sand dune wants to get to the top of it to see what is on the other side.

The dune distance d and height h are as shown below:


                              ....+
                          ........|      
                      ............|             
                  ................| h
              ....................|
          ........................|
Camel ----------------------------+
                    d

Steep dunes don't worry him because this is a smart camel!

When the slope is > 30 degrees, then instead of going straight up he will zig-zag back and forth so the climb is not so steep.

Kata Task

Given d and h then what is the shortest amount of walking for our smart camel to get to the top of the sand dune?

Mathematics
Puzzles
Geometry

Stats:

CreatedNov 16, 2016
PublishedNov 20, 2016
Warriors Trained1341
Total Skips58
Total Code Submissions3702
Total Times Completed259
JavaScript Completions83
Java Completions79
C# Completions36
Python Completions68
TypeScript Completions10
PHP Completions13
Kotlin Completions11
Total Stars29
% of votes with a positive feedback rating92% of 62
Total "Very Satisfied" Votes53
Total "Somewhat Satisfied" Votes8
Total "Not Satisfied" Votes1
Total Rank Assessments6
Average Assessed Rank
6 kyu
Highest Assessed Rank
6 kyu
Lowest Assessed Rank
7 kyu
Ad
Contributors
  • dinglemouse Avatar
  • SagePtr Avatar
  • smile67 Avatar
  • KataSideKick Avatar
  • hobovsky Avatar
  • saudiGuy Avatar
Ad