about | help | code help+videos | done | prefs |
Write a method that determines if we are able to conduct online testing or not. In order to be able to conduct online testing, the 'stuffWorking' array of strings MUST contain ALL of the following strings: "Power", "Water", "Internet", and "Computers". These strings can appear in any order and other strings can also appear in the array, but ALL of those MUST be in there somewhere at least once in order for online testing to work. If online testing will work, return 'true' otherwise return 'false'. Only EXACT matches count. For example, "power" or "POWER" does NOT count. Only "Power" is correct. This problem is a little harder than it first appears. You may use any non-cheating method that you choose, even if it is a little strange. Notes: The 'stuffWorking' array may be any length. Only EXACT matches count. If a string contains the word "Power" (or "Internet", etc.) along with other characters, that does not count. Only count exact matches with no extra characters in the string. However, the ARRAY can have extra strings beyond the needed four ("Power", "Internet", "Water", "Computers"). Look at the test data for examples. If you get stuck on this one, consider trying the P1SLHL problem or the SLHL problem or even the HL problem! test2024_04_16_APP1SLHL_onlineTesting(["Power", "Water", "Internet", "Computers"]) → true test2024_04_16_APP1SLHL_onlineTesting([]) → false test2024_04_16_APP1SLHL_onlineTesting(["", "", "Power", "", "YYZ", "Rush", "Computers", "Internet", "Dragons", "", "", "Water"]) → true ...Save, Compile, Run (ctrl-enter) |
Progress graphs:
Your progress graph for this problem
Random user progress graph for this problem
Random Epic Progress Graph
Difficulty: 250
Copyright Nick Parlante 2017 - privacy