USA | Verily Life Sciences | Onsite Problem

Location
USA
Posted
29 Jan 2026
302 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.

How it went

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

Questions asked (2)

  1. 01

    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. 02

    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
    

Know someone preparing? Send it to them:WhatsAppLinkedInX

Interviewed at Verily Life Sciences recently?

Write up your rounds while you still remember the questions. It helps the next person more than you would think.

Share your experience
Discussion 0

Questions for the author, or how your own interview compared.

Join the discussion

Sign in with Google to comment or ask the author a question.

No comments yet

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