• 1 day ago
Transcript
00:04In this chapter, we are going to learn a new data structure which we give the name of tris. So
00:10tris is a tree type data structure, but we don't call trees directly, we call tris. For tris, we use
00:17many parallel names for tris. The most popular parallel name tris is the prefix tree. What does the prefix tree
00:26mean? If I give two strings example, let's say I have strings lead there and the.
00:33so there in there there is already a string which is part of it and in there there is also
00:40this string. In fact, if I take another word there above it, then there is also there.
00:47We give it the name prefix. Prefix means a subpart or a substring which begins to start the main string.
00:54This is the part of the main string begins to start the main string. That's why we call it prefix.
01:00If I take a general string example, for example, I have taken apple. In apple, it will be a prefix
01:06in apple. In apple, it will be a prefix in apple. In apple, it will be a prefix in apple.
01:07In apple, it will be a prefix in apple. In apple, it will be a prefix in apple. It will
01:11be a prefix in apple.
01:13So trys, which are data structures, they actually work on the prefix. If I give 4 different words, then I
01:19store the prefix twice and twice. I store it in the same place. What would be an example of this?
01:24It would be an example of this. I have two different strings, the apple and app.
01:31Now, for each character, if I want to create a node in a tree, then I want to create a
01:36different node, then create a different node, then create a different node, then create a different node, then create a
01:41different node, then create a different node, then create a different node, then create a different node, then create a
01:44different node, then create a different node, then create a different node, then create a different node, then create a
01:47different node, then create a different node, then create a different node, then create a different node, then create a
01:49different node, then create a different node, then create a different node, then create a different node.
02:00same prefix, same prefix, same prefix, same prefix, same prefix, same prefix, same prefix, same prefix, same prefix, same prefix
02:04prefix, same prefix prefix prefix prefix prefix prefix prefix prefix prefix prefix prefix prefix prefix prefix prefix prefix prefix prefix
02:11prefix prefix prefix prefix prefix prefix prefix prefix prefix prefix prefix prefix prefix prefix prefix prefix prefix prefix prefix prefix
02:11prefix prefix prefix prefix prefix prefix prefix prefix prefix
02:23Now, retrieve it means that in English you have to take something, take something, take something, search something. And tries
02:29helps us a lot when we are searching with strings and related things. In fact, tries is the name of
02:35retrieval. Retrieval is a sub-part. Therefore, tries is the name of the name of retrieval. Because it is the
02:45work of retrieval. It is the work of retrieval.
02:48Besides, they also say digital search trees, but we can remember the main names. One is called retrieval trees, one
02:55is called prefix trees. But there are trees, and where are they? They are used for strings related to some
03:01questions.