7 kyu

Suitcase packing

746 of 1,9150xbba

Description:

Mr. Square is going on a holiday. He wants to bring 2 of his favorite squares with him, so he put them in his rectangle suitcase.

Write a function that, given the size of the squares and the suitcase, return whether the squares can fit inside the suitcase.

fit_in(a,b,m,n)
a,b are the sizes of the 2 squares
m,n are the sizes of the suitcase

Example

fit_in(1,2,3,2) should return True
fit_in(1,2,2,1) should return False
fit_in(3,2,3,2) should return False
fit_in(1,2,1,2) should return False
Puzzles

More By Author:

Check out these other kata created by 0xbba

Stats:

CreatedFeb 2, 2019
PublishedFeb 2, 2019
Warriors Trained4163
Total Skips75
Total Code Submissions23626
Total Times Completed1915
Python Completions746
Java Completions377
C# Completions167
JavaScript Completions603
Rust Completions122
F# Completions12
COBOL Completions6
Total Stars38
% of votes with a positive feedback rating82% of 420
Total "Very Satisfied" Votes308
Total "Somewhat Satisfied" Votes75
Total "Not Satisfied" Votes37
Total Rank Assessments16
Average Assessed Rank
7 kyu
Highest Assessed Rank
7 kyu
Lowest Assessed Rank
8 kyu
Ad
Contributors
  • 0xbba Avatar
  • suic Avatar
  • ParanoidUser Avatar
  • imjasonmiller Avatar
  • monadius Avatar
  • hobovsky Avatar
  • OpenByte Avatar
  • akar-0 Avatar
  • saudiGuy Avatar
Ad