I am wondering how leetcode calculates memory usage when we submit our solution? I would like to integrate that solution in my daily routine work. Calculation of runtime seems fairly straight forward by just using start and end times.. but calcualtion of memory usage is not clear to me.