Company: Wipro_9july

Difficulty: medium

Problem Statement

S = "< < > >" → 4 S = "< < < > > >" → 6 S = "" → 0 S = "< < ? > < > >" → 2 S = "< > < ? ? > > < >" → 4 solution(S) length of S ∈ [1..200,000] Write an efficient algorithm for the following assumptions: the length of string S is within the range [1..200,000]; string S is made only of the following characters: '<', '>', and/or '?'. # you can write to stdout for debugging purposes, e.g. # print("this is a debug message") def solution(S): # Implement your solution here pass

More Wipro_9july OA questionsInterview experiences