Help needed in how to prove greedy algorithms

I generally find it really hard to prove greedy strategies. Like for this question(https://leetcode.com/problems/pizza-with-3n-slices/) I had the idea of not choosing neighbors, but I couldn't prove that there is always a way possible to eat them if there are no neighbors. Can anyone please tell how to prove these strategies in an interview. And is it really necessary to come up with a formal proof in a 45 minute interview?

Comments (2)