en
Feedback
MORGAN STANLEY OA Help : Interview Help

MORGAN STANLEY OA Help : Interview Help

Open in Telegram

Codeforces Codechef Leetcode AtCoder GFG CodeStudio All Contests Solutions available.

Show more
894
Subscribers
-124 hours
-27 days
-530 days
Posts Archive
D done βœ…

C done βœ…

A and B done βœ…

dm me fast πŸ’― @cp_wala

https://leetcode.com/CookiesWasTaken/ Want to purchase this Leetcode Guardian Account? 😍

https://leetcode.com/Virus_ARzk/ https://leetcode.com/rohitashwa01/ Anyone wants these IDs? Very cheap price, dm me ☠️

if anyone wants to buy this Codeforces id, dm me @cp_wala https://codeforces.com/profile/Loki_Coder

if anyone wants to buy this Codeforces id, dm me @cp_wala https://codeforces.com/profile/Loki_Coder

πŸ₯³πŸ₯³

B done βœ…

Get ready for CF

Bhai koi AtCoder de raha hai to please Q2 ka testcase explain kardo πŸ₯Ί @cp_wala

void code() { int n; cin >> n; vector arr(n); for (int &i : arr) cin >> i; int minIndex = 0; for (int i = 0; i < n; i++) if (arr[i] < arr[minIndex]) minIndex = i; int res = minIndex; for (int i = minIndex; i < n - 1; i++) if (arr[i] > arr[i + 1]) res = -1; cout << res << endl; } // E // Enjoy ❀️

E solution Find the smallest element index and if the array is sorted from there then print its index otherwise if not sorted print -1