__CPP__Try_Hard__niranjan2004.hashnode.dev·Apr 26, 2024Simple DSA Question That Hurt My Ego : But Valuable Lessons LearnedQuestion Problem Statement Input and Output Formats Time and Space constrains Sample Test Cases Input 4 4 <<>> 4 >><< 5 >>>>> 7 <><><>< Output 3 3 6 2 Algorithm I came up with Idea We just have to simulate a stack ; One idea is to start from 0,...C++Add a thoughtful commentNo comments yetBe the first to start the conversation.