1
00:00:01,590 --> 00:00:02,220
Hi everyone.

2
00:00:02,220 --> 00:00:06,250
So in this video we're going to discuss this topic IQ test.

3
00:00:06,390 --> 00:00:09,640
Now suppose you are provided with DNA.

4
00:00:09,840 --> 00:00:13,340
You can easily mostly Eddie.

5
00:00:13,480 --> 00:00:20,370
Now I suppose you have vectors then also you can easily traverse the area using VECTOR DOT size function.

6
00:00:20,370 --> 00:00:24,240
You can go to each and every element and you can access the elements.

7
00:00:24,240 --> 00:00:26,080
Now you have a map.

8
00:00:26,370 --> 00:00:28,670
So how you will traverse the map.

9
00:00:28,740 --> 00:00:33,810
So basically for I was saying the map before accessing every key way looping inside the map for accessing

10
00:00:33,990 --> 00:00:41,370
every element inside the map we use I2 those so with the help of my duties we can traverse the maps.

11
00:00:42,300 --> 00:00:43,020
Okay.

12
00:00:43,110 --> 00:00:46,610
So many inbuilt glasses have ivory towers.

13
00:00:46,800 --> 00:00:49,240
So vector also have I do toes.

14
00:00:49,410 --> 00:00:50,720
We have a list glass.

15
00:00:50,760 --> 00:00:52,570
So list Glass also has.

16
00:00:52,580 --> 00:00:53,890
I treat those.

17
00:00:54,300 --> 00:00:55,650
Similarly we have.

18
00:00:55,650 --> 00:00:57,810
So this is map we have unordered map.

19
00:00:58,410 --> 00:01:00,580
So unordered map also has.

20
00:01:00,580 --> 00:01:01,800
I take those.

21
00:01:01,800 --> 00:01:08,320
Similarly you have an ordered and ordered set and ordered set.

22
00:01:08,460 --> 00:01:11,860
So they also have I do those.

23
00:01:11,930 --> 00:01:15,550
So what is on our dead set and what is simple set.

24
00:01:15,620 --> 00:01:19,420
So downloaded said map and our road map.

25
00:01:19,430 --> 00:01:20,420
So they are very similar.

26
00:01:20,690 --> 00:01:29,260
So what map stores map store key value PID but the store only keys central store only is it will not

27
00:01:29,260 --> 00:01:32,650
store values rest everything the same everything will be same.

28
00:01:32,650 --> 00:01:36,590
So this map will take log in time for a certain loop search.

29
00:01:36,610 --> 00:01:40,750
So this set will take logging time for insert delete and such.

30
00:01:40,750 --> 00:01:46,200
So this on road map it takes constant time for it to suddenly touch this set on our desert.

31
00:01:46,210 --> 00:01:49,220
It will also take constant time for and certainly touch.

32
00:01:49,240 --> 00:01:50,290
So I would think the same.

33
00:01:50,320 --> 00:01:57,910
It is just that map will to give a loop here and certainly store only keys not values simple so all

34
00:01:57,910 --> 00:02:01,650
of these map on that map I ordered said set.

35
00:02:01,960 --> 00:02:07,780
So for our dating on all these glasses you need I do this for vector it is optional to use.

36
00:02:07,780 --> 00:02:12,400
I do those two previously vector because we also have vector dot size function.

37
00:02:12,400 --> 00:02:15,970
OK so whatever plate is optional to use I do those.

38
00:02:16,100 --> 00:02:19,370
So if this map is this map is implemented using BSD.

39
00:02:19,750 --> 00:02:22,790
So this set is also implemented using BSD.

40
00:02:23,380 --> 00:02:26,080
Similarly and the map is implemented using hash table.

41
00:02:26,140 --> 00:02:29,010
So in order to set is also implemented using hash table.

42
00:02:29,650 --> 00:02:31,140
So everything is very same.

43
00:02:31,140 --> 00:02:36,310
Everything is very similar between between map and said so.

44
00:02:36,320 --> 00:02:37,780
Now let us write the code

45
00:02:41,250 --> 00:02:43,730
so I have included we had the file.

46
00:02:43,740 --> 00:02:49,950
Now let us create an unread map first let us take the body and ordered map and then we will also see

47
00:02:49,980 --> 00:02:52,660
that both how we can use our data for vector.

48
00:02:53,160 --> 00:02:54,490
So let's say the string.

49
00:02:54,510 --> 00:02:57,900
Let's say the keys string and the value is in danger.

50
00:02:57,930 --> 00:03:00,630
And the name of map is my map.

51
00:03:00,630 --> 00:03:05,820
And now let us push some basis so my map off let's use stringers ABC

52
00:03:08,810 --> 00:03:10,490
and let's say the value is 1.

53
00:03:10,490 --> 00:03:11,750
So now let's copy this

54
00:03:39,980 --> 00:03:43,930
so I have pushed six entries inside my map.

55
00:03:44,240 --> 00:03:47,780
So the size of my map is basically six.

56
00:03:47,810 --> 00:03:51,770
Now we want to access each and every element of my map.

57
00:03:52,250 --> 00:03:54,700
So how can we access each and every element.

58
00:03:54,710 --> 00:03:55,310
We will lose.

59
00:03:55,310 --> 00:03:56,560
I those.

60
00:03:56,630 --> 00:03:58,330
So how can we use our readers.

61
00:03:58,340 --> 00:04:00,950
And now let us discuss what that I do this.

62
00:04:02,120 --> 00:04:10,670
So basically we want to traverse our unordered map we want to access each and every element of our road

63
00:04:10,670 --> 00:04:11,330
map.

64
00:04:11,330 --> 00:04:13,760
So as the name suggests on our road map.

65
00:04:13,760 --> 00:04:16,670
So that means when you traverse this road map.

66
00:04:16,670 --> 00:04:18,720
So there is no ordering of the elements.

67
00:04:18,740 --> 00:04:23,240
So there is no guarantee which element will come first and which element will come last.

68
00:04:23,240 --> 00:04:28,430
So it is not guaranteed that ABC will come first and ABC too will come at last.

69
00:04:28,430 --> 00:04:30,530
So there is no guarantee.

70
00:04:30,530 --> 00:04:30,810
OK.

71
00:04:30,830 --> 00:04:34,600
And that means there is no ordering of elements.

72
00:04:34,670 --> 00:04:35,750
So now what will happen.

73
00:04:35,750 --> 00:04:38,540
So basically you have this map.

74
00:04:38,870 --> 00:04:40,610
So I don't know how it will.

75
00:04:40,610 --> 00:04:44,380
I would give a little bit then we have our data.

76
00:04:44,460 --> 00:04:50,700
So this idea that will point to an element and what is an element an element is basically a key value

77
00:04:50,700 --> 00:04:51,340
pit.

78
00:04:51,430 --> 00:04:54,940
So our data is basically pointing to a key way looping it.

79
00:04:55,170 --> 00:05:00,960
And if I will do a deep plus plus 80 plus plus means move to the next element.

80
00:05:00,990 --> 00:05:02,910
So next element can be anywhere.

81
00:05:02,910 --> 00:05:04,890
So it will move to the next element

82
00:05:10,690 --> 00:05:12,250
so when we'll do 80 plus plus.

83
00:05:12,250 --> 00:05:17,890
So this is a pointer it will move to the next element and we do not know how the map is distorting our

84
00:05:17,980 --> 00:05:18,430
elements.

85
00:05:18,460 --> 00:05:19,840
So it can be anything.

86
00:05:19,840 --> 00:05:22,180
So the next element can be anything we don't know that.

87
00:05:22,210 --> 00:05:26,100
So there is no guarantee in which ordered the elements will appear.

88
00:05:26,680 --> 00:05:35,800
Now how to create and I do the so the syntax for creating an idea is you will write an ordered map then

89
00:05:35,920 --> 00:05:44,300
you will write Stringer and Deja then you will write column column and then you will write this index.

90
00:05:44,310 --> 00:05:47,030
I do that and then you will give the name.

91
00:05:47,040 --> 00:05:48,870
So the name is 80.

92
00:05:48,870 --> 00:05:51,110
So this is due to type.

93
00:05:51,210 --> 00:05:58,810
This is the data type and this is basically the name of the variable.

94
00:05:58,920 --> 00:06:00,890
This is the name of the variable.

95
00:06:00,900 --> 00:06:01,150
Okay.

96
00:06:01,170 --> 00:06:10,060
So I have a function so I'd be if you will right I did close my map don't begin so I have a function

97
00:06:10,070 --> 00:06:18,710
Begin So this began with the help of this begin function decided I will point to the first element of

98
00:06:18,710 --> 00:06:19,590
the map.

99
00:06:19,700 --> 00:06:26,770
So this idea that it will point towards the first element of the map.

100
00:06:27,050 --> 00:06:27,960
Simple.

101
00:06:28,280 --> 00:06:29,950
And then you will do 80 plus plus.

102
00:06:29,960 --> 00:06:31,910
So we will move ahead.

103
00:06:31,910 --> 00:06:35,780
So I have a size function so I know for example analogous.

104
00:06:35,810 --> 00:06:37,680
So there was six element present.

105
00:06:37,730 --> 00:06:42,860
Now what I will do with the help of Begin function I will get to the first element.

106
00:06:42,860 --> 00:06:47,870
Then I will do 80 plus plus six times because the size of the map is six and I will print all the key

107
00:06:47,870 --> 00:06:49,170
values be it.

108
00:06:49,280 --> 00:06:56,970
No the second option of travelling the map is basically we have a function dart and so what I will do

109
00:06:57,840 --> 00:07:02,390
then I.D. becomes equal to my map God and what will happen.

110
00:07:02,430 --> 00:07:05,940
So and means so and does not mean this one.

111
00:07:06,030 --> 00:07:09,870
So and means the element after last.

112
00:07:09,870 --> 00:07:14,920
So basically this is and this is not and this is not and this is wrong.

113
00:07:14,940 --> 00:07:16,270
This one is end.

114
00:07:16,520 --> 00:07:21,900
So what can I do I will start from begin I will do 80 plus plus.

115
00:07:21,910 --> 00:07:29,160
So I will move ahead and then I will reach my map God and I will start by iterating simple.

116
00:07:29,500 --> 00:07:35,560
And the second option is basically you go to do begin you will do 80 plus plus six times because the

117
00:07:35,560 --> 00:07:42,810
size of the map is six and you can print all the elements no let us write the code so let us use for

118
00:07:42,810 --> 00:07:43,210
loop.

119
00:07:43,260 --> 00:07:48,360
You can also use a loop so for now again.

120
00:07:48,360 --> 00:07:50,240
First we have to give the data type.

121
00:07:50,670 --> 00:07:51,980
So this is the data type

122
00:07:55,930 --> 00:08:01,180
and the name of the variable is IP and we will go to the beginning.

123
00:08:01,210 --> 00:08:12,670
So my map that I have begun to function then IP is not it goes through I have dropped I lost my map

124
00:08:13,830 --> 00:08:22,320
Bill I'd be delighted it is not too close to my map Gordon and 80 plus plus symbol.

125
00:08:22,410 --> 00:08:23,670
Now what is I do that.

126
00:08:24,390 --> 00:08:27,780
So basically what is I data pointing to.

127
00:08:28,530 --> 00:08:38,180
So you have this idea that idea so this idea is basically pointing to appear so this is a beard.

128
00:08:38,440 --> 00:08:40,070
Give a beard.

129
00:08:40,480 --> 00:08:44,230
I want to access key and I also want to access the value.

130
00:08:44,230 --> 00:08:48,840
So if I have a beard how can I exist first and second element so I can write it out first.

131
00:08:49,240 --> 00:08:50,430
But I have an address.

132
00:08:50,620 --> 00:08:51,720
So this is a pointer.

133
00:08:52,180 --> 00:08:56,370
So if you want to access the first element you have to write i.e. arrow first.

134
00:08:58,060 --> 00:08:59,860
And similarly you want to access the value.

135
00:08:59,860 --> 00:09:02,290
So value is basically IP at second

136
00:09:05,560 --> 00:09:13,120
so idea first is basically key IP address second is basically value simple.

137
00:09:13,400 --> 00:09:19,530
So no let us print.

138
00:09:19,680 --> 00:09:26,300
So for printing the key idea row first ip is basically my idea that

139
00:09:39,260 --> 00:09:40,460
so idea first.

140
00:09:40,490 --> 00:09:42,950
And now let us also print the value

141
00:09:50,650 --> 00:09:53,590
so we're printing our value I will use IP address second

142
00:09:57,610 --> 00:09:58,110
analysis.

143
00:09:58,120 --> 00:09:59,330
This is on a road map.

144
00:09:59,440 --> 00:10:03,940
So there is no ordering of elements so there is no guarantee which element will come first and which

145
00:10:03,940 --> 00:10:05,070
element will come at last

146
00:10:11,630 --> 00:10:13,480
so see you can compare yourself.

147
00:10:13,640 --> 00:10:20,160
ABC 5 is coming at first then ABC forward then simple ABC then one two entry.

148
00:10:20,240 --> 00:10:25,130
Okay so there is no ordering.

149
00:10:25,260 --> 00:10:29,610
So now if instead of using on a road map you will use map.

150
00:10:29,880 --> 00:10:34,760
So in map this there is basically starting so let's copy this one

151
00:10:37,830 --> 00:10:39,730
now instead of using on the map.

152
00:10:39,840 --> 00:10:43,830
If I ever use simple map so simple map means order to map.

153
00:10:43,830 --> 00:10:46,410
So I have to change the name so it's in my map to

154
00:10:58,170 --> 00:11:07,580
and similarly this is my map to begin my map to dart end and ideas basically a local variable so there

155
00:11:07,650 --> 00:11:14,910
is no need to change the name now this map is basically ordered map and ordered map basically means

156
00:11:14,970 --> 00:11:17,930
if you will remember BSD BSD if you will do the order.

157
00:11:17,970 --> 00:11:18,470
I was in.

158
00:11:18,810 --> 00:11:27,900
So in order that I was in this basically sorted so basically I this map this to map it will start the

159
00:11:27,910 --> 00:11:31,400
keys it will start our keys.

160
00:11:31,410 --> 00:11:38,960
So this is how it will store the data so keys are sorted.

161
00:11:38,980 --> 00:11:43,460
Okay so this map will sort the keys so I will traverse in Sadr to my head.

162
00:11:43,510 --> 00:11:45,410
I will drive I was in sorted a.

163
00:11:45,520 --> 00:11:46,690
According to keys.

164
00:11:47,200 --> 00:11:48,680
Okay.

165
00:11:49,290 --> 00:11:49,930
Now let's see.

166
00:11:53,680 --> 00:11:53,920
Okay.

167
00:11:53,930 --> 00:11:56,840
So this will be basically map only

168
00:12:03,680 --> 00:12:04,430
so you can see

169
00:12:07,900 --> 00:12:09,210
the values sorted.

170
00:12:09,280 --> 00:12:10,740
So I am reversing this map.

171
00:12:10,780 --> 00:12:11,770
According to keys

172
00:12:15,140 --> 00:12:16,930
so what I want to say is.

173
00:12:17,390 --> 00:12:20,040
So forget about values.

174
00:12:20,120 --> 00:12:22,780
So basically maps are sorted according to keys.

175
00:12:22,820 --> 00:12:27,630
So ABC is smaller than ABC even than ABC 2 ABC 3 ABC for an ABC 5.

176
00:12:27,650 --> 00:12:30,550
It is not sorted according to values.

177
00:12:30,710 --> 00:12:44,060
So let me demonstrate to so for example if this value is 10 and let me push this one first

178
00:13:04,260 --> 00:13:10,140
so now what I did here first I am pushing ABC even then I am pushing ABC then ABC 2.

179
00:13:10,220 --> 00:13:11,420
So what will happen.

180
00:13:11,600 --> 00:13:12,790
The map will start.

181
00:13:12,800 --> 00:13:17,210
I will give a little bit on the basis of these not on the basis of values.

182
00:13:18,140 --> 00:13:19,250
So let's end our program

183
00:13:23,620 --> 00:13:28,380
now see the output again first ABC then ABC 1 and then ABC 2.

184
00:13:28,420 --> 00:13:35,740
So basically the order to map its site give a little bit on the basis of keys and not on the basis of

185
00:13:35,740 --> 00:13:36,660
values.

186
00:13:36,700 --> 00:13:48,740
OK so value then is coming at first so this is point to remembered so in map I have give a loop it so

187
00:13:48,740 --> 00:13:59,850
map will start on the basis of this map will start on bases of keys and not on bases of values you should

188
00:13:59,850 --> 00:14:08,380
remember this one certain on bases of keys and not on bases of values.

189
00:14:08,380 --> 00:14:14,770
So similarly just like in map we also have I2 those four vectors so let's see.

190
00:14:14,830 --> 00:14:16,710
So let us create a vector first

191
00:14:20,510 --> 00:14:27,350
vector often Tejas V and now let us push some values so we don't push back.

192
00:14:27,350 --> 00:14:27,900
Let's say 1

193
00:14:32,080 --> 00:14:33,690
in order to push some elements

194
00:14:38,760 --> 00:14:44,030
so this is two than three and four and then five.

195
00:14:44,140 --> 00:14:48,880
So basically that does has ordering of elements so days in order for element.

196
00:14:48,880 --> 00:14:55,440
So if you traverse the vector you will get that data in which you inserted the data

197
00:14:58,810 --> 00:15:01,260
so that 80.

198
00:15:01,380 --> 00:15:05,790
So this is the number the vector is V so readers begin

199
00:15:10,470 --> 00:15:14,500
V is not equal to Saudi.

200
00:15:14,520 --> 00:15:24,380
This is 80 so 80 is not equal to read out and similarly 80 plus plus.

201
00:15:24,400 --> 00:15:25,960
So what is happening here.

202
00:15:25,960 --> 00:15:34,590
So for Rick this idea is basically pointing to one element so if you want to access the element you

203
00:15:34,590 --> 00:15:35,850
have to right start.

204
00:15:35,850 --> 00:15:43,010
Ida B difference operator then start it because ideas containing address so that's why you have to write

205
00:15:43,100 --> 00:15:45,920
spot 80 we accessed the element

206
00:15:50,910 --> 00:15:51,830
start D

207
00:15:57,630 --> 00:16:06,850
so we know it's best so C one two three four five four days basically ordering of elements.

208
00:16:06,880 --> 00:16:11,740
If we make the first value then no let's test our program.

209
00:16:11,740 --> 00:16:16,510
So basically you will get the values in the order you inserted the values.

210
00:16:16,620 --> 00:16:16,820
Okay.

211
00:16:16,840 --> 00:16:19,910
So first I am getting 10 okay.

212
00:16:19,930 --> 00:16:22,870
So we all know how that works.

213
00:16:22,990 --> 00:16:27,000
Now apart from everything I did also have many other use cases.

214
00:16:27,250 --> 00:16:34,900
For example you can use I tweeted for finding an element whether an element exists or not.

215
00:16:34,900 --> 00:16:41,680
So basically where we can do so I have a function find.

216
00:16:41,690 --> 00:16:49,450
So I have a function find this find function will take key as input and this function will get done.

217
00:16:49,520 --> 00:16:54,510
And I do that so this find function returns and I do that.

218
00:16:54,570 --> 00:17:03,220
Now if this I day is basically it goes to my map gardened so that means the element does not exist in

219
00:17:03,220 --> 00:17:03,840
the map.

220
00:17:03,940 --> 00:17:04,530
Simple.

221
00:17:05,170 --> 00:17:06,040
So let me show you.

222
00:17:06,970 --> 00:17:16,270
So if my map got find function so this find function will take me as input and led to the Keys.

223
00:17:16,310 --> 00:17:28,010
ABC equals equals my map dot and so I don't do this find function will are done when I do that and the

224
00:17:28,010 --> 00:17:29,950
function is also the ending and I do that.

225
00:17:29,960 --> 00:17:32,150
So I'm comparing those two I do this.

226
00:17:32,510 --> 00:17:42,070
So if ABC is present in my map then this condition will become false so you can write

227
00:17:45,460 --> 00:17:46,200
not pleasant.

228
00:17:52,970 --> 00:17:54,280
As you can date present

229
00:18:17,820 --> 00:18:18,060
okay.

230
00:18:18,070 --> 00:18:25,680
So what I'm doing here is so I have inbuilt function find this fine function builder done me and I do

231
00:18:25,680 --> 00:18:26,210
that.

232
00:18:26,220 --> 00:18:29,850
And if the data is basically equal to the end I do it.

233
00:18:29,910 --> 00:18:35,920
So this enemy is basically this and not the last element.

234
00:18:36,040 --> 00:18:37,570
After the last element.

235
00:18:37,570 --> 00:18:41,070
So basically if I'm not able to find ABC what will happen.

236
00:18:41,090 --> 00:18:42,810
It will get done me the end point.

237
00:18:43,090 --> 00:18:48,790
And if it isn't a dunning me and pointed at me as ABC is not present as it is present.

238
00:18:48,790 --> 00:18:50,660
Okay so suppose ABC is busy.

239
00:18:50,680 --> 00:18:51,790
So what will happen.

240
00:18:51,790 --> 00:18:59,160
So this fine function will have done me and I tweeted to ABC so let's test our program.

241
00:18:59,160 --> 00:19:02,730
So ABC is currently present in my map so the output will be present

242
00:19:06,890 --> 00:19:13,180
so without parties present no apart from finding.

243
00:19:13,270 --> 00:19:15,680
So what I do best can also do.

244
00:19:16,000 --> 00:19:17,710
So let us create I do that.

245
00:19:17,800 --> 00:19:20,530
So let's copy this one on road map

246
00:19:31,550 --> 00:19:36,880
no let's try to find out traitor for ABC.

247
00:19:36,900 --> 00:19:40,140
So what I will do I will call this function my map not find ABC

248
00:19:43,270 --> 00:19:44,170
so this find.

249
00:19:44,330 --> 00:19:46,920
This is my map.

250
00:19:47,300 --> 00:19:54,780
So this find function well done me and I do that to ABC and then what you can do you can it is.

251
00:19:54,780 --> 00:20:00,120
So you have a function my map got it is now its function takes two things as input.

252
00:20:00,280 --> 00:20:03,300
Either you can give the key or you can also give I that.

253
00:20:03,930 --> 00:20:09,980
So I want to give ITER that had 80 so what is happening here.

254
00:20:09,970 --> 00:20:15,470
My map not find ABC so dysfunctional it done me and I traitor to ABC and then I am.

255
00:20:15,600 --> 00:20:18,230
I'm using these function to delete ABC.

256
00:20:18,230 --> 00:20:23,220
So if you will read this program this time the output will be not present output will be not present.

257
00:20:23,250 --> 00:20:24,020
Okay so let's see

258
00:20:27,470 --> 00:20:31,550
to the output is not present because we deleted that entry

259
00:20:35,490 --> 00:20:39,510
so now we have two functions.

260
00:20:39,510 --> 00:20:41,820
First function is find function.

261
00:20:41,820 --> 00:20:46,230
The second function is called function to check whether a key is present or not.

262
00:20:46,590 --> 00:20:51,570
So we have two functions now we can use find function but check whether a key is present or not.

263
00:20:51,570 --> 00:20:55,820
Similarly we can use current function to check whether a key is present or not.

264
00:20:55,890 --> 00:21:02,220
And similarly if what it is function for its function either you can pass the key it will it is or you

265
00:21:02,220 --> 00:21:07,740
can also pass the idea that it is function and it will delete that entry.

266
00:21:07,740 --> 00:21:12,930
Now one more thing what you can do you can use this function you can give the starting right data and

267
00:21:12,930 --> 00:21:15,020
you can also give the ending I that.

268
00:21:15,780 --> 00:21:16,630
So I want to delete.

269
00:21:16,650 --> 00:21:19,320
So this is the starting AI data and this is the ending I created.

270
00:21:19,320 --> 00:21:21,850
So what will happen if you will write this code.

271
00:21:21,930 --> 00:21:24,050
So what then this will be deleted.

272
00:21:24,270 --> 00:21:30,780
So it will delete I.T. it will delete a deep lesson it will delete IP plus 2 and it will delete 80 plus

273
00:21:30,780 --> 00:21:31,370
three.

274
00:21:31,470 --> 00:21:34,230
So 80 plus for this will not be deleted.

275
00:21:34,230 --> 00:21:38,120
This is basically excluded okay.

276
00:21:38,200 --> 00:21:44,800
So if you write something like this it is you will give the starting point that my map God begin and

277
00:21:44,890 --> 00:21:50,410
if you will give the ending Boyton which is my map not end.

278
00:21:50,590 --> 00:21:56,620
So what will happen if you will write like this it is my remembered begin comma my remember then.

279
00:21:56,650 --> 00:21:58,050
So this is the starting I data.

280
00:21:58,060 --> 00:21:59,120
This is the ending I drew.

281
00:21:59,140 --> 00:22:00,370
Then what will happen.

282
00:22:00,380 --> 00:22:04,860
Your map will become empty your map will become empty.

283
00:22:05,350 --> 00:22:07,570
So let's test this one.

284
00:22:07,600 --> 00:22:09,560
Okay.

285
00:22:09,730 --> 00:22:13,590
So basically.

286
00:22:14,140 --> 00:22:21,390
So basically using this thing using this thing does not make sense for an already map because for a

287
00:22:21,520 --> 00:22:25,930
map we don't know which one is the next entry because there is no ordering.

288
00:22:25,930 --> 00:22:32,500
So this thing only makes sense for basically ordering ordered glasses for example map for example vectors

289
00:22:33,760 --> 00:22:37,080
because there is ordering of elements okay.

290
00:22:37,090 --> 00:22:42,370
So this thing does not make any sense for that element because I don't know which element is the next

291
00:22:42,370 --> 00:22:44,140
element how the elements are stored.

292
00:22:45,160 --> 00:22:46,870
So now let's use it is function.

293
00:22:47,530 --> 00:22:49,700
So now let us it is the complete map.

294
00:22:49,750 --> 00:22:53,830
Let's make our map empty so what I will do my map what it is.

295
00:22:54,070 --> 00:22:55,300
So let's come into doubt

296
00:22:58,700 --> 00:23:00,020
I can give two pointers.

297
00:23:00,050 --> 00:23:02,420
So do I do this.

298
00:23:02,420 --> 00:23:11,730
So my map that begin start deleting from beginning data and gone delete my map Gordon.

299
00:23:11,800 --> 00:23:13,030
So what will happen.

300
00:23:13,030 --> 00:23:15,540
My map will become empty so if you will try to find out.

301
00:23:15,550 --> 00:23:23,920
ABC now will be not present and this will not print anything the output will be empty.

302
00:23:23,920 --> 00:23:29,690
Map so I am bending my map that begins with I would prefer to be empty map.

303
00:23:29,770 --> 00:23:30,090
Okay.

304
00:23:30,100 --> 00:23:34,020
So it will not bring anything because our map is empty.

305
00:23:34,030 --> 00:23:42,390
You can also print my map God size so you can print the size also so my map God size will be zero

306
00:23:45,680 --> 00:23:50,210
so I am deleting I am making my my map empty so the size will be zero.

307
00:23:50,210 --> 00:23:54,290
And this court will not print anything and I would prefer to be not present.

308
00:23:54,340 --> 00:23:55,660
Okay let's see.

309
00:24:02,040 --> 00:24:06,780
So not present then this line of code is not printing anything.

310
00:24:06,780 --> 00:24:08,620
Then my my not size is zero.

311
00:24:08,970 --> 00:24:11,790
So that's how you can use it is function.

312
00:24:11,880 --> 00:24:18,450
So all these function so fine function Begin function and function it is function.

313
00:24:18,450 --> 00:24:24,350
So all these functions are also present in vector classes and inside class on the set.

314
00:24:24,360 --> 00:24:26,980
Okay so all these functions at present data also.

315
00:24:27,060 --> 00:24:28,300
Now one more thing.

316
00:24:28,320 --> 00:24:35,220
So instead of using this vector and I do that word you can use I have a keyword or two.

317
00:24:35,420 --> 00:24:39,660
So I told you what is this.

318
00:24:39,720 --> 00:24:42,520
So this is actually a data type.

319
00:24:42,550 --> 00:24:44,140
Now I have a keyword or two.

320
00:24:44,790 --> 00:24:50,010
So what order keyword will do so it will take that type automatically.

321
00:24:50,010 --> 00:24:51,860
It will define that your type automatically.

322
00:24:51,870 --> 00:24:55,220
So instead of writing this and then I what can I do.

323
00:24:55,230 --> 00:25:01,510
I can write or do 80 so auto will automatically make that it type this one.

324
00:25:01,530 --> 00:25:03,970
So what do you are writing or writing or do ideas.

325
00:25:04,080 --> 00:25:09,880
My map does begin and this my memory begin will return and I take that off.

326
00:25:09,880 --> 00:25:18,090
This type and auto will judge this one or two will sense this and it will automatically take district

327
00:25:18,140 --> 00:25:18,500
type

328
00:25:22,760 --> 00:25:30,370
so instead of using this they can do you can simply write auto so auto is a keyword.

329
00:25:30,550 --> 00:25:31,920
OK so this will work.

330
00:25:31,980 --> 00:25:32,790
So now see

331
00:25:37,790 --> 00:25:38,090
OK.

332
00:25:38,120 --> 00:25:46,360
So our code is working similarly you can write auto x rayed also for example instead of vector integrator

333
00:25:46,410 --> 00:25:49,710
where you can do you can simply write auto

334
00:25:58,370 --> 00:25:58,680
okay.

335
00:25:58,700 --> 00:26:02,750
Our code is working similarly you can also do something like this

336
00:26:06,150 --> 00:26:12,990
instead of writing and A's 5 word again to see out a

337
00:26:16,590 --> 00:26:18,390
word you can do you can write auto head

338
00:26:23,770 --> 00:26:26,540
see the value of Phase 5.

339
00:26:26,590 --> 00:26:28,430
So that is the working of auto.

340
00:26:28,510 --> 00:26:31,420
Similarly what you can do.

341
00:26:31,420 --> 00:26:32,920
You can also write like this.

342
00:26:34,000 --> 00:26:39,810
Auto B is basically let's say a b c b you can do anything.

343
00:26:39,860 --> 00:26:40,830
Okay let me show you

344
00:26:44,760 --> 00:26:56,190
so instead of writing so instead of writing string C is ABC what you can do.

345
00:26:56,240 --> 00:27:02,830
You can write auto head auto C ABC and then you can print the value of c

346
00:27:08,110 --> 00:27:14,220
OK ABC so you can use auto instead of writing this big syntax.

347
00:27:14,230 --> 00:27:21,780
You can write auto OK short when so if you have any doubt in this video you can ask me.

348
00:27:21,810 --> 00:27:23,380
Okay I was shooting the next one but by.
