salesforce logo
Salesforce· MTS II

Salesforce SMTS | OA

Posted
8 Jul 2025
329 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.

How it went

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

Questions asked (1)

  1. 01

    Minimum Elements to Delete to Make Array Almost Sorted

    Data Structures & Algorithms · Hard

    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.

Know someone preparing? Send it to them:WhatsAppLinkedInX

Interviewed at Salesforce recently?

Write up your rounds while you still remember the questions. It helps the next person more than you would think.

Share your experience
Discussion 0

Questions for the author, or how your own interview compared.

Join the discussion

Sign in with Google to comment or ask the author a question.

No comments yet

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