Pergunta de entrevista da empresa Rackspace Technology

Write a function to compact a string in place: A. strip whitespace from the string. B. remove duplicate characters if they are next to each other

Respostas da entrevista

Sigiloso

8 de set. de 2016

def main(): chars = "".join(sys.argv[1:]).replace(" ", "") print("".join([curr for curr, nxt in izip_longest(chars, chars[1:]) if curr != nxt]))

Sigiloso

29 de jan. de 2021

The key in these questions is to cover the fundamentals, and be ready for the back-and-forth with the interviewer. Might be worth doing a mock interview with one of the Rackspace or ex-Rackspace Software Developer II experts on Prepfully? They give real-world practice and guidance, which is pretty helpful. prepfully.com/practice-interviews