Pergunta de entrevista da empresa Zendesk

Reverse String

Respostas da entrevista

Sigiloso

2 de fev. de 2015

Quick way to reverse a string: walk through the array from each end and swap the characters until you meet in the middle. O(n) time and doesn't require additional storage since its in place.

4

Sigiloso

6 de fev. de 2019

def my_cool_reverse_function(str) str.reverse end my_cool_reverse_function('why rewrite the wheel?')