Jump to content
  • Advertisement
Sign in to follow this  
ascii

word processing

This topic is 4826 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

What sort of data structures would be best for storing a document for a word processing program in memory (it supports images/text and various font sizes/faces... think Microsoft Word)? I got this wrong in an interview and am curious about it.

Share this post


Link to post
Share on other sites
Advertisement
Wrong? What was your answer out of curiosity? I imagine quite a few different data structures could be used effectively with different trade offs.

Share this post


Link to post
Share on other sites
I tried some complex binary tree where each node has an easy way of computing how far down on the page it is.

Share this post


Link to post
Share on other sites
If i remember correctly, one of the better data structures for word processing is a piece-table (span-table) to hold the document and then using some sort of gap-buffer for the actual editing of the text.

We did a project on this at uni a while back, but the details eludes me right now:(

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!