Retired
Browser tabs (retired)
Description:
Introduction
How often do you use a large number of tabs in bowser? The main character of this kata is Bob, and he often has problems with RAM overflow due to the large number of tabs. Bob already knows how much memory each tab needs and how much RAM space he has. Bob wants to know if he opens several tabs, will he have enough RAM space? Can you help him?

Task
Write a function that takes an array of tab sizes in the format "{size}{unit}"
, as well as the amount of free space on RAM and returns whether these tabs will fit on Bob's RAM
Examples
["1Kb", "10Kb", "5Kb"], "16Kb" -> True
["32Mb"], "32Kb" -> False
["32Kb"], "32Mb" -> True
["1000b"], "1Kb" -> True
["1000b", "1b"], "1Kb" -> False
["1Mb", "1000Kb", "1000000b"], "3Mb" -> True
["100Mb"]*10 + ["1b"], "1Gb" -> False
["1000Gb"], "1Tb" -> True
Untils
Should work with bits, kilobits, megabits, gigabits and terrabits.
Use formal values for this kata:
1Kb -> 1000b
1Mb -> 1000Kb
1Gb -> 1000Mb
1Tb -> 1000Gb
Logic
Similar Kata:
Stats:
Created | Jan 31, 2023 |
Warriors Trained | 27 |
Total Skips | 0 |
Total Code Submissions | 155 |
Total Times Completed | 23 |
Python Completions | 23 |
Total Stars | 1 |
% of votes with a positive feedback rating | 66% of 16 |
Total "Very Satisfied" Votes | 7 |
Total "Somewhat Satisfied" Votes | 7 |
Total "Not Satisfied" Votes | 2 |
Total Rank Assessments | 17 |
Average Assessed Rank | 7 kyu |
Highest Assessed Rank | 6 kyu |
Lowest Assessed Rank | 7 kyu |