This post will handle specially bout the Rope Data structure.
Rope is a data structure to hold a single string of characters. Yes, it is correct, that Rope holds only the characters which are represented in a string. Why any one on the earth wants a special data structure to hold the characters in a string where a contiguous chunk of bytes in memory is sufficient. Well, Rope is designed to optimise mainly three operations on the string.
Rope is a data structure to hold a single string of characters. Yes, it is correct, that Rope holds only the characters which are represented in a string. Why any one on the earth wants a special data structure to hold the characters in a string where a contiguous chunk of bytes in memory is sufficient. Well, Rope is designed to optimise mainly three operations on the string.
- Adding a new character to the String,
- Deleting a character from the string,
- Concatenating two strings.
Here is an excellent article on Rope Datastructure. Thanks to IBM Developer works.
No comments:
Post a Comment