about | help | code help+videos | done | prefs |
apcsaArraysFindShared
Heads up, this is a harder problem. Huzzah! Given two arrays of ints arr1 and arr2, create and return an output array containing only the int values that are the same in both inputs. The order of the output values should be determined by the order in which they are found in arr1. HINT: this problem definitely involves more than one loop. CHALLENGE: solve in one line. Yes, it's possible - I think.apcsaArraysFindShared([0, 1, 2, 3, 4], [4, 2, 5]) → [2, 4] apcsaArraysFindShared([4, 2, 5], [0, 1, 2, 3, 4]) → [4, 2] apcsaArraysFindShared([], [1, 2, 3]) → [] ...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: 260
Copyright Nick Parlante 2017 - privacy