Q) Design a text editor that supports the following features - move cursor UP,DOWN,LEFT,RIGHT - insert,delete, undo.
What data structures would you use?
Note :
If we do not have UP,DOWN , it can be solved using Doubly Linked List. It is explained in the article here -
https://aonecode.com/design-text-editor . But having UP, DOWN complicates the problem. This is not a System design thing and we need to write some working code as was done in that article.
Comments (3)


