[Solved] Friend Groups In A Line solution codechef 

Friend Groups In A Line solution codechef There are NN positions in a queue. Given a binary string SS of length NN, where Si=Si= ’11’ denotes, there is a person standing in the ithith position. The distance between two people standing in the ithith and jthjth positions respectively in the queue is ∣i−j∣∣i−j∣, where ∣x∣∣x∣ denotes the absolute value of xx. Now, two people are considered to be friends if they are at a …

[Solved] Friend Groups In A Line solution codechef  Read More »