about | help | code help+videos | done | prefs |
oneInEachSubArray
Define a function that when passed an integer array and a second integer representing the number of sub-arrays in which it should be divided (assume it can be divided evenly), returns true if there is at least one common item in every sub-array, false otherwise. oneInEachSubArray([20, 20, 20, 20], 2) → true oneInEachSubArray([20, 20, 20, 10, 10, 10], 2) → false oneInEachSubArray([10, 70, 20, 90, 50, 80, 60, 10, 20, 10, 100, 70], 3) → 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: 5 Post-solution available
Copyright Nick Parlante 2017 - privacy