| about | help | code help+videos | done | prefs |
Given two integer values, count the occurrences of the middle digit of the first value in the second value. If there is an even number of digits in the first number, return 0 instead. For example, given 721 and 123321, the middle digit is 2 and there are two 2's in the second number. But given 123321 and 721, there is an even number of digits in the first number so 0 is returned. middleCount(721, 123321) → 2 middleCount(123321, 721) → 0 middleCount(12, 45645645) → 0 ...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: 200
Copyright Nick Parlante 2017 - privacy