How to view full code?

I solved this question on Leetcode and it worked. but the thing is on Leetcode, you only need to submit function that does the task and here, on coding blocks you need to submit the whole function. How can I get complete code, which includes main function(), from leetcode to submit it here on coding blocks?

The thing is i have implemented the function in leetcode but i don’t know how to complete the main function in this question?

@ikshuldureja130 Bro leedcode does not discloses its backend. It has been such that you just need to write the function not the main but in hackerblocks you have to write the main function on your own. There is no such way out there.