All Questions
2 questions
2
votes
2
answers
6k
views
Finding total number of subarrays from given array of numbers with equal elements. Better approach
Given an array of numbers, count the total number of subarrays (consecutive elements) where all elements are equal.
Example: For below array
[1,1,3]
Ans: 4
Below are desired subarrays:
[1], [1],...
37
votes
9
answers
9k
views
Is the algorithm more important than the programming language?
During the current (2013) Google Code Jam contest, there was a problem that took C++ and Java people 200+ lines of code as compared to Python people that solved the same problem only using 40 lines of ...