Skip to content

Reverse String

Andrew Burke edited this page Apr 10, 2024 · 3 revisions

Unit 3 Session X (Click for link to problem statements)

U-nderstand

Understand what the interviewer is asking for by using test cases and questions about the problem.

  • Q
    • A

P-lan

Plan the solution with appropriate visualizations and pseudocode.

General Idea: TODO

1) TODO

⚠️ Common Mistakes

I-mplement

def reverse_string(s):
	return s[::-1]

# OR
def reverse_string(s):
	reversed_s = ''
	for char in s:
		reversed_s = char + reversed_s
	return reversed_s
Clone this wiki locally