bro in last question u didn't explain that how u generated that formula
@CodeBreakz
2 ай бұрын
@@StrawDev basically it calculates the ascii value of 1st and last charecter of string we put base value as 2 and sum of 2 zero charecters and then subtracted the 0th char and the last char basically The formula is designed to calculate a result based on the ASCII values of the characters at the ends of the binary string, with adjustments and normalization factors. The min(..., n) ensures the result is within the length of the string, handling specific constraints or requirements of the problem.
@GrimReaper-qy1wz
2 ай бұрын
Bro if array is 0 , 6 , 7 for 2nd question what should be the output? YES or NO
@CodeBreakz
2 ай бұрын
It would be No Just a simple logic first number is 0 so we cant iterate through it 2nd number is 6 so set b= { 6 : 1 } And count += 1 --> 1 3rd number is 7 so set b = { 6:1 , 7:1 } And count +=1 --> 2 Now finally our count total is 2 which is greater than 1 Count > 1 so answer is No
Пікірлер: 4