Amplitude interview question

2 leetcode questions, encode decode strings and swap kth node linkedlist.