Open In App

Ola Interview Experience for SDE-2 2022

Just given the test.It was an online test. Directly come to questions. There were 2 questions.

 Given string
 input : str ="zaaabccbaddd"
 output : zd

All the consecutive characters will be deleted.

 zaaabccbaddd     -> z(aa)ab(cc)ba(dd)d       -> za(bb)ad       -> z(aa)d       -> zd
                      these pairs will be deleted
Article Tags :