TikTok Interview Question

Reformat date, Kth largest substring.