In kadane’s Algorithm, code you have call max function which takes current sum or a maximum sum as a parameter, but in this code, you have not define max function and the code will not through any error it will compiled successfully HOW! . And how can we see the max function code.
Max function not defined
hello rajsaxena c++ has standard template library (stl) where functions , some data structure implementations and some other things are there. and because max is in that library (stl) it is not giving error . your doubt is totally valid it will give error in c because there no such library exist. you can check out stl videos for clarity.