---
title: "Discussion on \"Reverse the array - 450DSA Cracker Solution\" | Hashnode"
description: "Discussion on \"Reverse the array - 450DSA Cracker Solution\". Reverse a String\nGiven a String S , print the reverse of the string as output.\nclass Solution {\n  public:\n    string revStr(string S) {\n        for(int i = 0, j= S.length()-1; i<j ;i++,j--)\n        {\n            swap(S[i], S[j]);\n        }\n        re..."
url: "https://hashnode.com/posts/reverse-the-array-450dsa-cracker-solution/65c1d56726c6ace5c6f281ff"
---

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

Discussion

# [Reverse the array - 450DSA Cracker Solution](https://keycomputereducation.hashnode.dev/reverse-the-array-450dsa-cracker-solution?utm_source=hashnode&utm_medium=feed)

Reverse a String Given a String S , print the reverse of the string as output. class Solution { public: string revStr(string S) { for(int i = 0, j= S.length()-1; i<j ;i++,j--) { swap(S\[i\], S\[j\]); } re...

Feb 6, 2024 · 4 min read · keycomputereducation.hashnode.dev  
Read the article

-   [#450dsa](https://hashnode.com/tag/450dsa)
-   [#reverse-string](https://hashnode.com/tag/reverse-string)
-   [#cpp](https://hashnode.com/tag/cpp)
-   [#dsa](https://hashnode.com/tag/dsa)
-   [#data-structures](https://hashnode.com/tag/data-structures)

## Written by

[Akshima Sharma](https://hashnode.com/@Keycomputereducation)

@Keycomputereducation

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

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
