Implement list cloning and k-frequency finder | Meta Interview Question