🔥 Get ready — STRIKE hits on October 18! 🔥
STRIKE-logo

Say Goodbye to Coding Confusion with Doubt Assistance!

âš™
STRIKE
Doubt Assistance
Clear your coding doubts faster with personalized 1:1 support from expert TAs and guidance from your batch community.
Enroll Now →
int main() { stack<string> doubtStack; doubtStack.push("How to reverse a string?"); doubtStack.push("Why binary search needs sorted array?"); doubtStack.push("Difference between vector and array?"); doubtStack.push("How to calculate time complexity?"); cout << "Total doubts: " << doubtStack.size() << endl; while(!doubtStack.empty()) { cout << "Resolving doubt: " << doubtStack.top() << endl; doubtStack.pop(); } vector<int> scores = {75,88,92,60,85,78}; sort(scores.begin(), scores.end()); cout << "Sorted scores: "; for(auto s : scores) cout << s << " "; cout << endl; vector<int> rev(scores.rbegin(), scores.rend()); cout << "Highest to lowest: "; for(auto s : rev) cout << s << " "; cout << endl; int sum = 0; for(auto s : scores) sum += s; cout << "Total marks: " << sum << endl; cout << "Average marks: " << (double)sum / scores.size() << endl; cout << "All doubts resolved. Keep learning!" << endl; return 0; }