String invertida

String invertida

Inverte uma string fornecida.
Mergulha a fundo em String invertida!

Explora 14 formas diferentes de inverter uma string, abordando vários temas, incluindo pontos de código Unicode, grafemas, alocações na pilha versus no heap e apontadores. Relaxa e aproveita 45 minutos de aprendizagem com o Jeremy e o Erik.

Instruções

Reversing strings (reading them from right to left, rather than from left to right) is a surprisingly common task in programming.

For example, in bioinformatics, reversing the sequence of DNA or RNA strings is often important for various analyses, such as finding complementary strands or identifying palindromic sequences that have biological significance.

Your task is to reverse a given string.

Some examples:

  • Turn "stressed" into "desserts".
  • Turn "strops" into "sports".
  • Turn "racecar" into "racecar".