11/*
22 written by Pankaj Kumar.
33 country:-INDIA
4- Institute: National Institute of Technology, Uttarakhand
54*/
65typedef long long ll ;
7- typedef unsigned long long ull;
8- typedef vector<int > vl;
9- typedef vector<vector<int >> vvl;
10- #define speed cin.tie(0 );cout.tie(0 );ios_base::sync_with_stdio(0 );
11- /* Abbrevations */
12- #define ff first
13- #define ss second
14- #define mp make_pair
15- #define pb push_back
16- // loops
17- #define forin (arr,n ) for (ll i=0 ;i<n;i++) cin>>arr[i];
18- // Some print
19- #define no cout<<" NO" <<endl;
20- #define yes cout<<" YES" <<endl;
21- // sort
22- #define all (V ) (V).begin(),(V).end()
23- #define srt (V ) sort(all(V))
24- #define srtGreat (V ) sort(all(V),greater<ll>())
25- // some extra
26- #define printv (v ) for (ll i=0 ;i<ll(v.size());i++){cout<<v[i]<<" " ;} cout<<endl;
27- #define precision (x ) cout<<fixed<<setprecision(x);
28- #define sz (V ) ll(V.size())
296
307
318/* ascii value
329A=65,Z=90,a=97,z=122
3310*/
3411
35- /* Some syntax
36- //Syntax to create a min heap for priority queue
37- //priority_queue <int, vector<int>, greater<int>>pq;
38- */
3912/* --------------------MAIN PROGRAM----------------------------*/
4013// to run ctrl+b
4114const ll INF=1e18 ;
@@ -51,16 +24,21 @@ const ll mod2=998244353;
5124
5225
5326// Add main code here
54- class Solution {
27+
28+ class Solution
29+ {
5530public:
56- void reverseString (vector<char >& s) {
57- reverse (s.begin (),s.end ());
31+ void reverseString (vector<char > &s)
32+ {
33+ int n = s.size ();
34+ for (int i = 0 ; i < n / 2 ; i++)
35+ {
36+ swap (s[i], s[n - i - 1 ]);
37+ }
38+ return ;
5839 }
5940};
6041
61-
62-
63-
6442/* -----------------END OF PROGRAM --------------------*/
6543/*
6644* stuff you should look before submission
0 commit comments