Test | Status | Code Input and Output |
---|---|---|
1 | Pass |
hotels =["CityLights";"SeaView";"MarketPlace";"ResortSpa";"Nightingale";"Clubadub";"SkylineView";"MarinaBay";"ComfortFirst";"VillageValley"];
ratings = [7.2;8.7;6.5;9.3;4.3;6.9;8.8;5.9;7.4;9.1];
cutoff = 8;
good_correct = ["SeaView";"ResortSpa";"SkylineView";"VillageValley"];
assert(isequal(find_good_hotels(hotels,ratings,cutoff),good_correct))
good =
[]
good =
"SeaView"
good =
2×1 string array
"SeaView"
"ResortSpa"
good =
3×1 string array
"SeaView"
"ResortSpa"
"SkylineView"
good =
4×1 string array
"SeaView"
"ResortSpa"
"SkylineView"
"VillageValley"
|
2 | Pass |
hotels = ["ComfortFirst";"CityLights";"Clubadub";"Nightingale";"MarketPlace";"MarinaBay";"ResortSpa";"VillageValley";"SkylineView";"SeaView"];
ratings = [8.8000;7.2000;9.3000;8.7000;6.9000;7.4000;6.5000;4.3000;5.9000;9.1000];
cutoff = 9;
good_correct = ["Clubadub";"SeaView"];
assert(isequal(find_good_hotels(hotels,ratings,cutoff),good_correct))
good =
[]
good =
"Clubadub"
good =
2×1 string array
"Clubadub"
"SeaView"
|
3 | Pass |
hotels = ["Nightingale";"VillageValley";"SeaView";"CityLights";"ResortSpa";"ComfortFirst";"SkylineView";"Clubadub";"MarinaBay";"MarketPlace"];
ratings = [7.2000;8.7000;6.5000;7.4000;9.3000;9.1000;6.9000;8.8000;5.9000;4.3000];
cutoff = 7;
good_correct = ["Nightingale";"VillageValley";"CityLights";"ResortSpa";"ComfortFirst";"Clubadub"];
assert(isequal(find_good_hotels(hotels,ratings,cutoff),good_correct))
good =
[]
good =
"Nightingale"
good =
2×1 string array
"Nightingale"
"VillageValley"
good =
3×1 string array
"Nightingale"
"VillageValley"
"CityLights"
good =
4×1 string array
"Nightingale"
"VillageValley"
"CityLights"
"ResortSpa"
good =
5×1 string array
"Nightingale"
"VillageValley"
"CityLights"
"ResortSpa"
"ComfortFirst"
good =
6×1 string array
"Nightingale"
"VillageValley"
"CityLights"
"ResortSpa"
"ComfortFirst"
"Clubadub"
|
4 | Pass |
hotels = ["Nightingale";"VillageValley";"SeaView";"CityLights";"ResortSpa";"ComfortFirst";"SkylineView";"Clubadub";"MarinaBay";"MarketPlace"];
ratings = [7.2000;8.7000;6.5000;7.4000;9.3000;9.1000;6.9000;8.8000;5.9000;4.3000];
cutoff = 7.2000;
good_correct = ["Nightingale";"VillageValley";"CityLights";"ResortSpa";"ComfortFirst";"Clubadub"];
assert(isequal(find_good_hotels(hotels,ratings,cutoff),good_correct))
good =
[]
good =
"Nightingale"
good =
2×1 string array
"Nightingale"
"VillageValley"
good =
3×1 string array
"Nightingale"
"VillageValley"
"CityLights"
good =
4×1 string array
"Nightingale"
"VillageValley"
"CityLights"
"ResortSpa"
good =
5×1 string array
"Nightingale"
"VillageValley"
"CityLights"
"ResortSpa"
"ComfortFirst"
good =
6×1 string array
"Nightingale"
"VillageValley"
"CityLights"
"ResortSpa"
"ComfortFirst"
"Clubadub"
|
Sort a list of complex numbers based on far they are from the origin.
4327 Solvers
Sum of first n terms of a harmonic progression
257 Solvers
Compute a dot product of two vectors x and y
750 Solvers
We love vectorized solutions. Problem 1 : remove the row average.
546 Solvers
Find the dimensions of a matrix
372 Solvers
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!