USA | Verily Life Sciences | Onsite Problem

verily life sciences logo
verily life sciences
· USA
January 29, 2026 · 12 reads

Summary

I completed an onsite interview with Verily Life Sciences in USA, where I was presented with an interesting algorithmic problem about doubling and inverting array transformations. I found the first part straightforward but encountered difficulties and a bug in my implementation for the second part, although I was told I was very close to the solution.

Full Experience

Completed an onsite for Verily pretty recently and got asked this pretty interesting problem in one of the rounds.

Fun with Doubles

Part 1

Given an array arr of integers, double each element and concatenate.

For example, [1, 2, 4] --> [1, 2, 4, 2, 4, 8]
notice the pattern in the output?

Part 2

Given an output that may or may not come from part 1, identify the inverse.

[1, 2, 4, 2, 4, 8] --> [1, 2, 4]
[4, 2, 8, 16] --> [2, 8]
[1, 4] --> NO INVERSE

Reflection

  • Part 1 as you may expect is very straightforward. spend at most 5 minutes on coding it up
  • I sort of got stuck on the thought process for part 2. I think I had the idea of "pairing things up", but I had a tricky bug in my implementation
  • In hindsight, I realized that the implementation was really straightforward and I sort of overcomplicated it. Interviewer said that "I was pretty close and with minor updates, I would have gotten it"
  • 50/50 on if I'll move forward

Interview Questions (2)

1.

Double and Concatenate Array Elements

Data Structures & Algorithms·Easy

Given an array arr of integers, double each element and concatenate.

For example, [1, 2, 4] --> [1, 2, 4, 2, 4, 8]
notice the pattern in the output?

2.

Inverse of Double and Concatenate Array

Data Structures & Algorithms·Medium

Given an output that may or may not come from part 1, identify the inverse.

[1, 2, 4, 2, 4, 8] --> [1, 2, 4]
[4, 2, 8, 16] --> [2, 8]
[1, 4] --> NO INVERSE
Discussion (0)

Share your thoughts and ask questions

Join the Discussion

Sign in with Google to share your thoughts and ask questions

No comments yet

Be the first to share your thoughts and start the discussion!