Web appOpen in Telegram

Post#include <bits/stdc++.h>

3 August 2025
W
WhiteHat Coding
#include <bits/stdc++.h> using namespace std; class Solution { public: string clearStars(string A) { string s = A; priority_queue<char, vector<char>, greater<char>> pq; vector<vector<int>> ind(26); unordered_set<int> rs; for (int i = 0; i < s.size(); ++i) { if (s[i] == '*') { rs.insert(i); char ch = pq.top(); pq.pop(); // geekynerd pq.push(ch); rs.insert(ind[ch - 'a'].back()); // geekynerd ind[ch - 'a'].pop_back(); // geekynerd if (ind[ch - 'a'].empty()) pq.pop(); // geekynerd continue; } if (ind[s[i] - 'a'].empty()) // geekynerd pq.push(s[i]); ind[s[i] - 'a'].push_back(i); // geekynerd } string res = ""; for (int i = 0; i < s.size(); ++i) { if (!rs.count(i)) { res += s[i]; // geekynerd } } return res; } }; Clear stars Start removal whitehatcoding
331 ·

Nearby in the feed

WWhiteHat CodingDm @ILOVEU_143✅ For Coding Help or Any Exam Help 😄 💯 Clearance ✅ Check the previous proofs 👆👆 Contact @ILOVEU_143 👨‍💻 Note: it's paid help 💯 Clearance and genuiWWhiteHat CodingPlacements Help Available 👍👍 If you also want to crack your current placements Contact: @ILOVEU_143 Book your slots ASAP Scroll above and check the work 💯 Clear
this message
WWhiteHat CodingGuys those who need paid help can msg here 👇 @ILOVEU_000 Note - Book slot one day before exam ! TRUST US EXPECT US 😊WWhiteHat CodingPoll
WWhiteHat CodingWhiteHat Coding@whitehatcoding · channel · Tech
481subscribers40average post reach
Venue feed Open in Telegram

An open public feed from the search index ChatCrawler — “Google for public Telegram”; refreshed as the venue is crawled. Times are UTC.

Public content only, official Telegram API. About · FAQ · What we do not do · Remove a page · Catalog · Search · How we count