Company: Nokia_9march
Difficulty: medium
Maximum displacement Problem Description Given a 1D lane, you can move one step ahead (denoted by S) or move one step back (denoted by R). You are given a string of commands and an integer N. Calculate the maximum displacement that you can achieve from the starting point after changing exactly N commands in the string and executing them. Function Description Complete the Game() function. This function takes the following 2 parameters and returns the required answer: Str : Represents the string containing the commands N : Represents the number of commands that must be changed Input format for custom testing Note: Use this input format if you are testing against custom input or writing code in a language where we don't provide boilerplate code. The first line contains the string Str which represents the string that contains the commands. The second line contains an integer N which represents the number of commands that must be changed. Output format Print the maximum displacement that yo