Wednesday, August 29, 2018

Leetcode 724. Find pivot index

August 29, 2018

Introduction


It is an easy level algorithm called find pivot index. I wrote a solution once I had only one idea.

My practice


Here is the discussion link I shared. I found the bug using compiler and then in the function calculateSuffixSum I declared a variable index, and suffix[index] is assigned value instead of suffix[i].


No comments:

Post a Comment