You don't need to implement this because:
And finally, if it's an exercise that you should write yourself and external resources are forbidden - then you shouldn't ask it in the first place.
Good luck!
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.