Weekly Leetcode contest 183 problem. Greedy solution Proof

Revision en3, by rr459595, 2020-04-06 23:22:35

Although I understand the intuition behind the solution, I am not able to prove the greedy approach formally. Can someone please help me with the proof of greedy solution for this problem ( https://leetcode.com/problems/longest-happy-string/ ) ?

Thanks.

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en3 English rr459595 2020-04-06 23:22:35 5
en2 English rr459595 2020-04-06 23:18:34 110
en1 English rr459595 2020-04-06 23:17:31 199 Initial revision (published)