wes d2a2ba9e15 first commit 4 jaren geleden
..
README.md d2a2ba9e15 first commit 4 jaren geleden
code.cpp d2a2ba9e15 first commit 4 jaren geleden
unitTest.cpp d2a2ba9e15 first commit 4 jaren geleden

README.md

Check If the Brick Fits through the Hole

by Matt tags: conditions, validation

Summary

Write the function that takes three dimensions of a brick: height(a), width(b) and depth(c) and returns true if this brick can fit into a hole with the width(w) and height(h). Examples doesBrickFit(1, 1, 1, 1, 1) ➞ true doesBrickFit(1, 2, 1, 1, 1) ➞ true doesBrickFit(1, 2, 2, 1, 1) ➞ false Notes You can turn the brick with any side towards the hole. We ass

Instructions

Write the function that takes three dimensions of a brick: height(a), width(b) and depth(c) and returns true if this brick can fit into a hole with the width(w) and height(h).

Examples

doesBrickFit(1, 1, 1, 1, 1) ➞ true

doesBrickFit(1, 2, 1, 1, 1) ➞ true

doesBrickFit(1, 2, 2, 1, 1) ➞ false

Notes

  • You can turn the brick with any side towards the hole.
  • We assume that the brick fits if its sizes equal the ones of the hole (i.e. brick size should be less than or equal to the size of the hole, not strickly less).