1 00:00:01,080 --> 00:00:03,790 Hello, everyone, welcome to this brand new video. 2 00:00:03,810 --> 00:00:07,950 So in this video, we are going to learn Venuti, the structure, which is called tri. 3 00:00:08,490 --> 00:00:14,190 So before moving on and learning what is try, first of all, let's try to understand why do we need 4 00:00:14,190 --> 00:00:15,380 this new researcher? 5 00:00:15,570 --> 00:00:18,140 So, for example, we are given a list of words. 6 00:00:18,150 --> 00:00:19,110 This is our words. 7 00:00:19,710 --> 00:00:25,830 And if I want to search one word and this words area, for example, if I want to search the world news, 8 00:00:26,490 --> 00:00:31,650 then how I will search whether this news word is present in this world or not. 9 00:00:32,020 --> 00:00:33,480 The approach is very simple, right? 10 00:00:33,630 --> 00:00:40,470 You will Etretat what these words are and you will compare the given word with the words which are present 11 00:00:40,470 --> 00:00:45,200 in this word today, for example, first of all, you will compare whether there are equals to news 12 00:00:45,210 --> 00:00:45,580 on Earth. 13 00:00:45,580 --> 00:00:50,150 Then we will compare this word and you will compare this word and you will keep comparing the word. 14 00:00:50,160 --> 00:00:55,530 And finally, you will be able to find the word news and then you will report your answer. 15 00:00:55,540 --> 00:01:01,440 Yes, the given word is basically present in the words that, for example, if the what is not present, 16 00:01:02,460 --> 00:01:05,700 then when word is not present in this words, very. 17 00:01:06,180 --> 00:01:08,880 But what do you need to do in order to find out this? 18 00:01:09,090 --> 00:01:16,350 You will iterate over the complete words, Eddie, and you will compare each word with the given word 19 00:01:17,400 --> 00:01:22,410 and you will not be able to find the given word when in this words that end they will report your answer. 20 00:01:22,420 --> 00:01:25,310 No, the word is not present in the words. 21 00:01:26,370 --> 00:01:30,500 So this approach is not good at all for each word. 22 00:01:30,510 --> 00:01:36,220 You need to get rid of this words adding and to compare each word with the given word. 23 00:01:36,720 --> 00:01:37,610 So what do want to do? 24 00:01:37,620 --> 00:01:39,120 We want to optimize this. 25 00:01:39,120 --> 00:01:45,090 We want to optimise our searching process and try to the structure will help us do that. 26 00:01:45,540 --> 00:01:47,410 So how actually will help us? 27 00:01:47,820 --> 00:01:49,510 So let's start. 28 00:01:49,530 --> 00:01:55,800 So try to first of all, we will have a start node or we can say a root node, just like they are treated 29 00:01:55,800 --> 00:01:56,330 as a teacher. 30 00:01:56,760 --> 00:02:03,120 So we have the start node or the we can say it is a root node and what will do? 31 00:02:03,120 --> 00:02:04,860 We will insert all the words. 32 00:02:05,250 --> 00:02:10,410 We will insert all these words in our new structure, which is called try. 33 00:02:11,070 --> 00:02:13,470 Now let's see how you will insert words. 34 00:02:14,520 --> 00:02:20,280 So first, let's first let me draw some Overlordship, some nodes, basically. 35 00:02:24,020 --> 00:02:29,690 Yep, so let's try to insert first word, what with the process and how we will be able to insert the 36 00:02:29,690 --> 00:02:38,000 word, so I want to insert this word or so I will go to the root node and I will see whether the character 37 00:02:38,000 --> 00:02:41,340 is whether a node corresponding to is present or not. 38 00:02:41,360 --> 00:02:44,200 No, there is no node corresponding to correctly. 39 00:02:44,570 --> 00:02:51,290 So I will create one node and I will store it here and I will make the connection. 40 00:02:52,220 --> 00:02:54,040 I will make this connection. 41 00:02:55,280 --> 00:02:56,510 Now go to the next word. 42 00:02:56,510 --> 00:03:04,460 Ah, so I am standing at this node, I am standing at Node A and I will see whether there is a node 43 00:03:04,580 --> 00:03:07,860 where the or not there is no node with character. 44 00:03:08,040 --> 00:03:13,190 So you will create one node and you will store are here and they will make this connection. 45 00:03:14,720 --> 00:03:16,200 Now go to the next character. 46 00:03:16,520 --> 00:03:22,820 So next character is e you are standing at this node and you will see whether there is a node with the 47 00:03:22,820 --> 00:03:24,010 correctly or not. 48 00:03:24,620 --> 00:03:25,790 No, there is no node. 49 00:03:25,910 --> 00:03:32,660 So I will create one node and you restore it here and you will make this connection. 50 00:03:34,160 --> 00:03:37,230 So now our word is basically over. 51 00:03:37,850 --> 00:03:40,670 So what we will do, we will highlight the last node. 52 00:03:41,030 --> 00:03:45,760 So we will highlight we will make this node a bold in order. 53 00:03:45,800 --> 00:03:50,540 We will basically highlight this node so that we can represent that ad correctly. 54 00:03:50,790 --> 00:03:52,490 One word is ending here. 55 00:03:52,940 --> 00:03:55,040 So e r e is one, correct? 56 00:03:55,280 --> 00:03:56,480 Sorry, it's one word. 57 00:03:56,900 --> 00:04:00,740 And we are highlighting to indicate that this is a given word. 58 00:04:00,770 --> 00:04:03,350 This is the and this is the end. 59 00:04:03,350 --> 00:04:03,680 Correct. 60 00:04:03,920 --> 00:04:04,770 For a given word. 61 00:04:05,750 --> 00:04:09,200 Now let's move on to the second word which you want to insert. 62 00:04:09,860 --> 00:04:15,710 So again, we will see here that e so you are standing at the root node. 63 00:04:16,160 --> 00:04:17,720 You are inserting one more word. 64 00:04:17,750 --> 00:04:21,880 You are standing at the root and you will see whether it is present or not. 65 00:04:21,890 --> 00:04:22,970 Yes, we have it. 66 00:04:23,870 --> 00:04:25,070 So I will reach here. 67 00:04:26,510 --> 00:04:30,040 Then I will check whether S is present or not. 68 00:04:30,050 --> 00:04:31,390 No s is not present. 69 00:04:31,520 --> 00:04:38,720 So what you will do, you will create one node and you will store s here and you will make this connection. 70 00:04:40,460 --> 00:04:46,640 And now, as is the end character for the government, since this is the end character, you will basically 71 00:04:46,640 --> 00:04:51,450 highlight this and you will say this is basically terminal. 72 00:04:51,450 --> 00:04:52,340 All right. 73 00:04:52,910 --> 00:04:54,470 This node is not terminal. 74 00:04:54,470 --> 00:04:58,310 This node is known terminal this nor the terminal, not by terminal node. 75 00:04:58,310 --> 00:05:01,150 I mean that the given word is ending here. 76 00:05:01,160 --> 00:05:02,960 This is the end goal for a given word. 77 00:05:02,990 --> 00:05:05,400 Similarly, this is the end character of one of the word. 78 00:05:05,600 --> 00:05:07,040 So this is our terminal node. 79 00:05:08,120 --> 00:05:12,080 Now, let's move on to the next word that we want to insert. 80 00:05:12,090 --> 00:05:13,310 We want to insert do so. 81 00:05:13,310 --> 00:05:16,190 Let me create some nodes first. 82 00:05:22,940 --> 00:05:29,740 OK, so I want to insert the word do so, first of all, I will check whether this is present or not. 83 00:05:29,750 --> 00:05:35,350 So I am standing at the root node and I want to check the present or not is not present. 84 00:05:35,600 --> 00:05:41,490 So you will create one node and it will be here and you will make this connection. 85 00:05:42,620 --> 00:05:45,200 Now move on to the second character, which is all. 86 00:05:45,380 --> 00:05:50,480 So you are standing at this node and you will see whether there is a node with character or not. 87 00:05:50,580 --> 00:05:51,790 No, there is no word. 88 00:05:52,010 --> 00:05:55,810 So you will make a node and you will store all here. 89 00:05:56,150 --> 00:06:02,350 You will make this connection and all is basically the last character for the given word. 90 00:06:02,360 --> 00:06:09,650 So you will basically highlight this node will make this node as terminal node to indicate that this 91 00:06:09,650 --> 00:06:10,340 is the end. 92 00:06:10,340 --> 00:06:10,640 Correct. 93 00:06:10,670 --> 00:06:14,560 Therefore, a given word, a word is basically ending at character. 94 00:06:15,740 --> 00:06:19,190 Now let's move on to the next word, which we want to insert. 95 00:06:19,400 --> 00:06:22,810 So the next word that we want to insert is basically dot. 96 00:06:23,330 --> 00:06:24,850 So I'm standing at the root node. 97 00:06:25,280 --> 00:06:27,680 I will see whether correctly this present or not. 98 00:06:27,680 --> 00:06:28,100 Yes. 99 00:06:28,400 --> 00:06:29,740 Correctly is present. 100 00:06:29,870 --> 00:06:31,940 So come here next. 101 00:06:31,940 --> 00:06:34,280 Check whether character is present or not. 102 00:06:34,310 --> 00:06:35,920 Yes, character is present. 103 00:06:35,930 --> 00:06:40,940 So you will come here now to check whether character to present or not. 104 00:06:40,970 --> 00:06:42,130 B is not present. 105 00:06:42,350 --> 00:06:49,310 So you will make a node and you will still be in that node and it will make this connection. 106 00:06:49,790 --> 00:06:58,310 And since P is basically the last character of a word, so you will highlight this node, we will make 107 00:06:58,310 --> 00:06:59,960 this node a terminal. 108 00:06:59,980 --> 00:07:01,910 All right. 109 00:07:02,330 --> 00:07:05,850 Now let's move on to the new word which you want to insert. 110 00:07:05,870 --> 00:07:07,480 So I want to insert the word new. 111 00:07:07,700 --> 00:07:10,460 So let me create a few nodes here. 112 00:07:15,840 --> 00:07:16,730 So let's start. 113 00:07:17,190 --> 00:07:24,690 So I want to insert the word new, I'm standing at the root node and there is no character, no node 114 00:07:24,690 --> 00:07:26,050 which is storing the character. 115 00:07:26,220 --> 00:07:31,600 And so I will create one node and it will store the character in and I will make this connection. 116 00:07:33,090 --> 00:07:34,640 Now, the next character is E! 117 00:07:34,830 --> 00:07:36,500 So I am standing at this node. 118 00:07:37,230 --> 00:07:44,160 I am standing at this node and there is no node with the character E, so I will make this node and 119 00:07:44,160 --> 00:07:46,930 I will make this connection one thing. 120 00:07:46,950 --> 00:07:49,660 Do not confuse that E is present here. 121 00:07:49,680 --> 00:07:51,250 So why I am creating new node. 122 00:07:51,630 --> 00:07:53,910 So basically I will check for each character. 123 00:07:53,910 --> 00:07:58,160 Right for and there is no node present downward often. 124 00:07:58,170 --> 00:07:58,580 Right. 125 00:07:58,730 --> 00:08:02,600 So it is basically downward of are not downward of end. 126 00:08:03,420 --> 00:08:03,780 Right. 127 00:08:03,870 --> 00:08:05,660 That's why you need to create new node. 128 00:08:06,030 --> 00:08:12,240 So I will, I'm standing here and I will see whether is pointing towards any node which is containing 129 00:08:12,240 --> 00:08:12,820 you or not. 130 00:08:13,470 --> 00:08:17,110 OK, so I need to see downward for each character. 131 00:08:17,130 --> 00:08:18,420 So it is not present. 132 00:08:18,420 --> 00:08:21,440 I have created E and I have made this connection. 133 00:08:21,450 --> 00:08:23,130 Now I am standing at E. 134 00:08:24,090 --> 00:08:27,460 I will see whether the word W is present or not. 135 00:08:27,480 --> 00:08:28,510 So downward of it. 136 00:08:28,530 --> 00:08:31,150 There is no node with which is storing W. 137 00:08:31,410 --> 00:08:36,890 So I will create one node and it was was the blue in it and it will make this connection. 138 00:08:36,900 --> 00:08:43,260 And since this is the terminal word sorry, since this is the terminal character, we will highlight 139 00:08:43,260 --> 00:08:46,400 this word, we will highlight this node. 140 00:08:46,430 --> 00:08:46,770 Sorry. 141 00:08:47,310 --> 00:08:52,000 So we are highlighting this node via because one word is ending at this character. 142 00:08:52,980 --> 00:08:53,430 Fine. 143 00:08:53,790 --> 00:08:56,570 Now let's try to insert new character. 144 00:08:56,580 --> 00:08:58,260 Sorry, let's try to insert news. 145 00:08:58,270 --> 00:09:02,200 So we're trending at the root node, see whether any is present or not. 146 00:09:02,220 --> 00:09:02,760 Yes. 147 00:09:02,760 --> 00:09:03,740 And this present. 148 00:09:03,750 --> 00:09:12,140 So go to N now check e presenta n is present so go to check whether W is present or NSW is present. 149 00:09:12,150 --> 00:09:14,300 So go to the blue check whether S. 150 00:09:14,370 --> 00:09:15,210 S present or not. 151 00:09:15,220 --> 00:09:18,700 No s is not present in the down side of the blue. 152 00:09:18,900 --> 00:09:25,260 So what you will do, you will create one node and you will store as here you will make this connection. 153 00:09:25,380 --> 00:09:30,200 And since this is the last character, you will also highlight this. 154 00:09:31,530 --> 00:09:33,450 So I will also highlight this. 155 00:09:36,390 --> 00:09:44,010 Now, let's try to insert the remaining words in our trial subject, so let me create notes here. 156 00:09:46,260 --> 00:09:47,910 OK, now let's move. 157 00:09:48,060 --> 00:09:50,010 So I want to insert this word. 158 00:09:50,020 --> 00:09:55,800 So the first character is and I am standing at the root node and I have a node which is storing. 159 00:09:55,800 --> 00:09:57,780 And so I will come here basically. 160 00:09:59,250 --> 00:10:01,860 And from here what I will do. 161 00:10:01,980 --> 00:10:05,950 So I will check whether the next word no is pleasant or not. 162 00:10:07,020 --> 00:10:12,440 So all in the downside of and I have only I do not have. 163 00:10:12,480 --> 00:10:19,080 Oh so what I will do, I will create one node and this node will store all and I will make the connection. 164 00:10:22,630 --> 00:10:30,410 And I will come at this node, so I am standing at this node and always basically the last character. 165 00:10:30,430 --> 00:10:35,950 So what you will do, you will also highlight that this node is basically the last character. 166 00:10:37,660 --> 00:10:41,700 Now, I want to insert this word not so again. 167 00:10:41,710 --> 00:10:43,210 You are standing at the root node. 168 00:10:43,540 --> 00:10:50,560 There is a node which is storing and so you will come here now the next characteris or so there is a 169 00:10:50,560 --> 00:10:52,240 node which is storing the character. 170 00:10:52,500 --> 00:10:55,350 So you will come here now the next characteristic. 171 00:10:55,630 --> 00:11:00,300 So all is not pointing to any node which is storing piece of it. 172 00:11:00,310 --> 00:11:04,510 You will do, you will create one new node and you will still be here. 173 00:11:05,110 --> 00:11:06,820 You will make this connection. 174 00:11:07,840 --> 00:11:14,020 And since this is the last character for a while, you will make this node as terminal node. 175 00:11:16,550 --> 00:11:24,920 And now our trial structure is complete, so our trial, a structure is complete now, and let's see 176 00:11:24,920 --> 00:11:27,980 how this trial structure will improve our searching. 177 00:11:28,340 --> 00:11:34,990 Let's try to find out, for example, if I want to search the world news, if I want to search the world 178 00:11:35,000 --> 00:11:37,190 news, what I will do, go to the root node. 179 00:11:38,060 --> 00:11:41,870 Now, check whether there is a node with character and or not. 180 00:11:41,880 --> 00:11:43,510 Yes, there is a word with character. 181 00:11:43,520 --> 00:11:44,990 And so go to this node. 182 00:11:46,120 --> 00:11:50,680 I am standing here next characteris E to check whether there is an order registering. 183 00:11:50,740 --> 00:11:59,360 Yes, there is an order which is storing e so come here next connector is W so e pointing towards the 184 00:11:59,360 --> 00:11:59,570 blue. 185 00:11:59,600 --> 00:12:01,350 Yes, there is an order which is storing the blue. 186 00:12:01,370 --> 00:12:02,150 So come here. 187 00:12:02,150 --> 00:12:03,110 I am standing here. 188 00:12:04,790 --> 00:12:10,300 Check as whether there is an order which is an NDA character, which there is an order which is storing 189 00:12:10,310 --> 00:12:12,810 is now the word is over. 190 00:12:13,040 --> 00:12:13,990 Now the wait is over. 191 00:12:14,000 --> 00:12:16,430 So check whether this note is a terminal or not. 192 00:12:16,440 --> 00:12:18,170 Yes, this is a terminal. 193 00:12:18,410 --> 00:12:22,250 So my output will be yes, my output will be yes. 194 00:12:22,250 --> 00:12:29,180 We have optimized our searching because in this case, what is the time, complexity, time? 195 00:12:29,180 --> 00:12:33,980 Complexity is basically begal for wifehood because there are four characters. 196 00:12:34,610 --> 00:12:35,030 Right. 197 00:12:35,090 --> 00:12:41,840 So this is simply because for now, for this word, when you are standing at the root node, you will 198 00:12:41,840 --> 00:12:44,300 see whether there is an order restoring the blue or not. 199 00:12:44,330 --> 00:12:46,480 No, there is no node which is storing the blue. 200 00:12:46,940 --> 00:12:51,430 We are we have a deep and and there is no node which are storing the blue. 201 00:12:51,560 --> 00:12:52,780 I will return answer no. 202 00:12:53,630 --> 00:12:59,990 So in just one comparison, in just one comparison, I am able to find out that this node is not present. 203 00:13:01,400 --> 00:13:08,510 OK, so basically for any given word, for any given time, complexity, in the worst case time complexity 204 00:13:08,510 --> 00:13:14,780 will be big off and and is basically the number of characters present in the world and is the number 205 00:13:14,780 --> 00:13:19,180 of characters, for example, in this case news, there are four characters. 206 00:13:19,370 --> 00:13:21,190 So time complexity is big, all four. 207 00:13:22,400 --> 00:13:28,310 So this is the time complexity big off and is the number of characters in the given word. 208 00:13:31,040 --> 00:13:33,260 So you can see we have. 209 00:13:34,610 --> 00:13:40,880 Optimized our searching with the help of private sector search, private sector basically helps us in 210 00:13:40,880 --> 00:13:41,600 searching. 211 00:13:43,450 --> 00:13:47,700 Right now, let's take one more example, so we're taking the. 212 00:13:48,570 --> 00:13:56,280 So what you can do, for example, we have a dictionary, right, we have dictionary. 213 00:13:58,810 --> 00:14:03,050 Dictionary is containing basically a list of words in a dictionary. 214 00:14:03,070 --> 00:14:11,860 We have a list of words, for example, given a word, you want to check whether the given word is present 215 00:14:11,860 --> 00:14:12,760 in dictionary or not. 216 00:14:13,000 --> 00:14:16,620 So what will be the very naive approach, very brute force approach? 217 00:14:16,630 --> 00:14:22,270 It will be basically go through the list of words in the dictionary and check each word of a given word. 218 00:14:23,060 --> 00:14:27,950 But that will be a lot of a lot of time, so best approach will be what you do. 219 00:14:28,340 --> 00:14:32,200 You will insert all the words of dictionary into a try. 220 00:14:32,900 --> 00:14:34,250 You will make a try. 221 00:14:34,280 --> 00:14:35,520 You will build a try. 222 00:14:36,020 --> 00:14:38,900 So we will build a tri of dictionary words. 223 00:14:41,740 --> 00:14:45,520 We will build a tri of dictionary word, and this will be a one time. 224 00:14:49,010 --> 00:14:55,010 Once we have built a tri of all the words the dictionary, then if you want to search any word in the 225 00:14:55,010 --> 00:14:57,020 dictionary, what you will do, you will search and try. 226 00:14:58,290 --> 00:15:03,060 We will search and try and in private, as the searching, searching is basically big often. 227 00:15:05,500 --> 00:15:11,900 And that's how Trai is used in dictionary, right, and repeating myself, but will do. 228 00:15:12,850 --> 00:15:18,550 This is a one time hard work that what we need to do, we need to insert all the words of a try in a 229 00:15:18,550 --> 00:15:19,120 dictionary. 230 00:15:19,300 --> 00:15:25,140 And once we have inserted all the words now for searching our time, complexity will be Gulfam. 231 00:15:26,580 --> 00:15:28,830 So we have optimized our searching. 232 00:15:29,820 --> 00:15:32,060 Let me give you one more example of trying. 233 00:15:32,670 --> 00:15:38,360 So have you heard of so there is one app, which is Truecaller. 234 00:15:40,140 --> 00:15:47,970 Now, what Truecaller does is you provide the number, for example, this is the number and the Truecaller 235 00:15:47,970 --> 00:15:49,560 app from a given number. 236 00:15:49,560 --> 00:15:51,150 It will give you the name of the person. 237 00:15:52,650 --> 00:15:56,140 It will give you the name of the person to whom this number belongs. 238 00:15:56,460 --> 00:15:57,990 So how Truecaller app works. 239 00:15:58,200 --> 00:16:00,480 So basically, it builds a try. 240 00:16:00,510 --> 00:16:03,110 It builds a trial phone number, for example. 241 00:16:03,120 --> 00:16:05,230 Let me take a few examples here. 242 00:16:05,670 --> 00:16:07,740 So this is another number. 243 00:16:09,390 --> 00:16:11,430 Let's say this is another number. 244 00:16:16,030 --> 00:16:22,010 Let's say these are few numbers and each number has a name associated with it, so each number has a 245 00:16:22,010 --> 00:16:26,060 name, let's say the name for this is basically ABC four. 246 00:16:26,060 --> 00:16:28,400 This is something else. 247 00:16:28,950 --> 00:16:29,720 Let's name it. 248 00:16:30,080 --> 00:16:36,380 The name for this is basically then this is B, C, D, E, D, and this is E, so these are the name 249 00:16:36,380 --> 00:16:38,070 of the person's right. 250 00:16:38,390 --> 00:16:43,070 So how how Truecaller works is basically it creates a triangle phone number. 251 00:16:43,760 --> 00:16:46,390 So let's create very fast. 252 00:16:46,640 --> 00:16:48,140 So I have this root node. 253 00:16:50,210 --> 00:16:57,560 Now, insert this word sunshine, create an order for the nine again, create next nine, then one, 254 00:16:57,560 --> 00:17:03,290 then seven to create nine, then I have one and then I have seven. 255 00:17:06,690 --> 00:17:15,720 Next is basically nine nine one eight, so nine nine one and eight, so for eight. 256 00:17:18,270 --> 00:17:27,060 Next is nine nine nine, so nine nine one and then nine. 257 00:17:30,030 --> 00:17:40,410 Next is nine nine nine nine, so nine, then again nine, then we have nine here, so we have nine here 258 00:17:41,640 --> 00:17:42,750 and then again nine. 259 00:17:43,170 --> 00:17:48,690 So this is nine, Nexus nine, nine, two and seven. 260 00:17:48,990 --> 00:17:51,450 So nine, then nine. 261 00:17:51,750 --> 00:17:56,160 Then I have to here and then I have seven. 262 00:18:00,340 --> 00:18:09,250 So all the terminal nodes seven is a terminal node, so four, what I will do, I was told, hear the 263 00:18:09,250 --> 00:18:10,410 name of the person. 264 00:18:10,420 --> 00:18:16,090 So this is our terminal node and this terminal node is storing one more information, which is the name 265 00:18:16,090 --> 00:18:16,890 of the person. 266 00:18:17,230 --> 00:18:23,110 So I will told the name of the person in this node, last node basically for nine, when I restore the 267 00:18:23,110 --> 00:18:26,260 name of the person, the name of the person is B, this is our terminal load. 268 00:18:28,590 --> 00:18:33,630 Nine nine one nine, so this is, again, a terminal node and a terminal load is going to store the 269 00:18:33,630 --> 00:18:34,540 name of the person. 270 00:18:34,560 --> 00:18:38,210 So the name of the person is C nine nine nine nine. 271 00:18:38,220 --> 00:18:43,860 So I want to be here and this is our terminal node again, nine nine to seven. 272 00:18:44,130 --> 00:18:47,640 So I was told the name of the person here and this is our terminal node. 273 00:18:48,960 --> 00:18:53,970 So Truecaller app makes a tri of all the phone numbers and terminal node. 274 00:18:54,000 --> 00:18:55,540 It's the name of the person. 275 00:18:56,170 --> 00:19:02,880 Now, if you if you want to search one number, for example, let's say I want to search nine nine nine 276 00:19:02,880 --> 00:19:05,700 nine, I am giving the input nine nine nine nine. 277 00:19:05,700 --> 00:19:08,910 And I want to search what is the name of the person for this number. 278 00:19:09,120 --> 00:19:15,570 So what I will do, go to nine, then go to nine, then go to nine, then go to nine. 279 00:19:15,630 --> 00:19:21,450 And I will reach the terminal node, I will reach the terminal node and I will check the name of the 280 00:19:21,450 --> 00:19:22,260 person inside. 281 00:19:22,260 --> 00:19:22,980 So I will return. 282 00:19:22,980 --> 00:19:31,730 My answer is the simple right now let's see if a number does not belong or a number is not present in 283 00:19:31,740 --> 00:19:32,120 a try. 284 00:19:32,130 --> 00:19:35,400 For example, this number is not present in tray. 285 00:19:35,850 --> 00:19:36,930 Basically Truecaller. 286 00:19:37,200 --> 00:19:39,780 Truecaller does not have information of this number. 287 00:19:40,170 --> 00:19:42,860 So I will search in the tray. 288 00:19:42,990 --> 00:19:44,040 So nine then. 289 00:19:44,040 --> 00:19:45,000 I don't have it. 290 00:19:45,390 --> 00:19:46,800 I don't have it here. 291 00:19:47,520 --> 00:19:50,520 So I will say that we do not have the information. 292 00:19:50,520 --> 00:19:55,520 We do not have the either the phone number is wrong in this phone number is wrong. 293 00:19:55,530 --> 00:19:57,680 This is not a valid phone number or the Truecaller. 294 00:19:57,690 --> 00:20:00,600 I will say I do not have the information for this number. 295 00:20:00,900 --> 00:20:02,640 So it will say no information. 296 00:20:04,680 --> 00:20:05,090 Right. 297 00:20:05,400 --> 00:20:11,330 So this is how Truecaller works, and if this is a valid number, then Truecaller will insert this valid 298 00:20:11,340 --> 00:20:15,120 number into it and it will store the corresponding name also. 299 00:20:16,110 --> 00:20:22,360 So that is the that is the basically that is the practical implementation of the private sector. 300 00:20:23,160 --> 00:20:25,040 So in next, we do what we will do. 301 00:20:25,050 --> 00:20:28,170 We will implement our own private sector. 302 00:20:29,400 --> 00:20:31,740 So this is it from this video. 303 00:20:31,750 --> 00:20:33,990 Guys, I will see you in the next one. 304 00:20:34,140 --> 00:20:38,270 And in the next video, we are going to implement our private sector. 305 00:20:39,000 --> 00:20:39,780 So this is it. 306 00:20:40,650 --> 00:20:41,550 Thank you, guys.