Salesforce SMTS | OA

salesforce logo
salesforce
MTS II
July 8, 20254 reads

Summary

I encountered a challenging array problem during my Salesforce Online Assessment where I had to find the minimum elements to delete to make an array 'almost sorted', meaning at most one element deletion makes it perfectly sorted. I only passed 5 out of 13 test cases.

Full Experience

Get min. elements to be deleted to make array almost sorted. Almost sorted means- we can delete atmost 1 element to make it perfectly sorted.

Was only able to pass 5 of 13 tests :(

P.S : not solvable by chatGpt/Gemini.

Screenshot 2025-07-08 at 8.16.27 AM.png

WhatsApp Image 2025-07-08 at 08.15.09.jpeg

#Salesforce #OA

Interview Questions (1)

Q1
Minimum Elements to Delete to Make Array Almost Sorted
Data Structures & AlgorithmsHard

Get min. elements to be deleted to make array almost sorted. Almost sorted means- we can delete atmost 1 element to make it perfectly sorted.

Discussion (0)

Share your thoughts and ask questions

Join the Discussion

Sign in with Google to share your thoughts and ask questions

No comments yet

Be the first to share your thoughts and start the discussion!