AppFolio Interview Question: Given an array [1, 1, 2, 3, 4... | Glassdoor

Interview Question

Software Engineer Interview San Diego, CA

Given an array [1, 1, 2, 3, 4, 4, 4, 5], find sum such that

  two consecutive elements are same. For example, 1 + 4 + 4 = 9 as there are two 1s and three 4s
Answer

Add Answers or Comments

To comment on this, Sign In or Sign Up.