varun
BAN USER
Comments (5)
Reputation 10
Page:
1
Comment hidden because of low score. Click to expand.
Comment hidden because of low score. Click to expand.
0
of 0 vote
Don't you think its a modification of diameter in a binary tree where you have to do the little modification, using the values of nodes.
Check this out:-
http: www geeksforgeeks.org diameter-of-a-binary-tree
where \ is replaced by space
Please share your thoughts
Comment hidden because of low score. Click to expand.
Comment hidden because of low score. Click to expand.
Comment hidden because of low score. Click to expand.
Page:
1
CareerCup is the world's biggest and best source for software engineering interview preparation. See all our resources.
For Basic text editor , you can use Doubly linkedlist (to store modify the current visible characters) and Stack for undo and redo operation.
- varun December 04, 2014Use flyweight pattern for store the character ,its styling and display of font information.
These details are only applicable when you are using it in memory.
If you need these information to be stored, then use some custom file format and store the information with some tags(can use xml tags to identify whether the character is bold or not) etc .When loading these files back check these tags and display accordingly.
Display UI(View) could be your dynamic JSP page if your text editor is online ....you can use javascript also etc etc.