WePay Interview Question: Using PHP, how would you take... | Glassdoor

Interview Question

Engineering Interview Palo Alto, CA

Using PHP, how would you take a string containing the

  letters "GOOGLE" and remove the duplicate letters to output "GOGLE" (without using array_unique)?
php, big o notation

Interview Answer

2 Answers


Note: Be able to write the Big O notation for your solution, and ensure that your code is as efficient as possible.

Interview Candidate on Oct 8, 2011

This is not removal of duplicates as google => gogle. Is it like remove contiguous duplicates in a string?

MockingJay on Oct 16, 2015

Add Answers or Comments

To comment on this, Sign In or Sign Up.