---
title: "Discussion on \"[LeetCode] Top Interview 150 Problems Solving # 151 Reverse Words in a String\" | Hashnode"
description: "Discussion on \"[LeetCode] Top Interview 150 Problems Solving # 151 Reverse Words in a String\". Reverse a string by words, trimming spaces. Use `split()`, reverse list, and `join()`. Time complexity is optimized"
url: "https://hashnode.com/posts/leetcode-top-interview-150-problems-solving-151-reverse-words-in-a-string/67e5ee657149772ee6ad8702"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [\[LeetCode\] Top Interview 150 Problems Solving # 151 Reverse Words in a String](https://ramieeee.me/leetcode-top-interview-150-problems-solving-151-reverse-words-in-a-string?utm_source=hashnode&utm_medium=feed)

Reverse a string by words, trimming spaces. Use \`split()\`, reverse list, and \`join()\`. Time complexity is optimized

Mar 28, 2025 · 2 min read · ramieeee.me  
Read the article

-   [#slicing](https://hashnode.com/tag/slicing)
-   [#python](https://hashnode.com/tag/python)
-   [#leetcode](https://hashnode.com/tag/leetcode)

## Written by

[Ramhee Yeon](https://hashnode.com/@ramieeee)

@ramieeee · Seoul, South Korea

  
[View profile](https://hashnode.com/@ramieeee)

AI researcher and developer

South Korean, master's degree of AI. A research focused AI specialist, and a rogrammer for LLM. I am seeking opportunities worldwide. I used to live in Frankfurt, Moscow, Pretoria, Baguio. Where to next?

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
