-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.xml
616 lines (509 loc) · 39.2 KB
/
index.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
<channel>
<title>hieudoan7</title>
<link>https://hieudoan7.github.io/</link>
<description>Recent content on hieudoan7</description>
<generator>Hugo -- gohugo.io</generator>
<language>en</language>
<lastBuildDate>Fri, 08 Apr 2022 21:35:43 +0700</lastBuildDate>
<atom:link href="https://hieudoan7.github.io/index.xml" rel="self" type="application/rss+xml" />
<item>
<title>SQL Problems Collection</title>
<link>https://hieudoan7.github.io/be/sql/</link>
<pubDate>Sun, 02 Oct 2022 14:46:02 +0700</pubDate>
<guid>https://hieudoan7.github.io/be/sql/</guid>
<description>Today, I&rsquo;m gonna write down some SQL problems I&rsquo;ve solved or faced during interviewing and working.
First Goes First
1. Find the average price of 3 recent days P/S: This problem is originally from Axon Hackerank Online Test.
You have 1 table named Transactions: Transactions(ID, ResourceID, Price, TransactionTime)
Example data
1insert into transactions(ID, Name, Price, Time) 2values 3(1, &#39;Shoes&#39;, 100, 20220810), 4(2, &#39;Hat&#39;, 50, 20220809), 5(3, &#39;Shirt&#39;, 50, 20220808); You are asked to write SQL query showing the average price of 3 recent days for everyday.</description>
</item>
<item>
<title>My working tools across computer</title>
<link>https://hieudoan7.github.io/be/working_tools/</link>
<pubDate>Sat, 01 Oct 2022 16:21:42 +0700</pubDate>
<guid>https://hieudoan7.github.io/be/working_tools/</guid>
<description>I&rsquo;ve been working for more than 2 years. It&rsquo;s quite a long time but still i don&rsquo;t have an personal toolbox of developing. On this special day, the day I&rsquo;m preparing to leave my second job, gonna sit down and write about all the tools I have used in software development. Here we go!!!
1. Git Command line
use .oh-my-zsh to levarage of nice git command alias
Smart git</description>
</item>
<item>
<title>How I setup my macbook</title>
<link>https://hieudoan7.github.io/others/mac_setup/</link>
<pubDate>Sat, 01 Oct 2022 16:19:26 +0700</pubDate>
<guid>https://hieudoan7.github.io/others/mac_setup/</guid>
<description>Today, I&rsquo;m cleaning up my company macbook before handing over it on my last working day. So, I&rsquo;ll leave out here notes, softwares, apps I used in my computer.
1. UnnaturalScrollWheels an amazing app which helps to make you feel natural in using either touchpad or external mouse
https://github.com/ther0n/UnnaturalScrollWheels
2. Rectangle helps drag your app to corners of your screen
This is my in-use setup 3. Smart Countdown Timer I&rsquo;ve just wanted to find an alternative for GoForIt on ubuntu and this is the best i can find, it&rsquo;s available on apple store.</description>
</item>
<item>
<title>Lý thuyết thi bằng lái ô tô B2</title>
<link>https://hieudoan7.github.io/others/oto_b2/</link>
<pubDate>Tue, 13 Sep 2022 20:15:39 +0700</pubDate>
<guid>https://hieudoan7.github.io/others/oto_b2/</guid>
<description>Các câu mà các bạn cần lưu ý nè 31. Dùng còi từ 11 giờ đêm đến 5 giờ sáng hôm sau 54. FB2 phải đủ 21 tuổi 55. 18 tuổi là đủ lái xe máy trên 50cm3 và ô tô, tải &lt; 3 tấn rưởi 56. Hạng E (&gt; 30 chỗ ngồi), FD phải đủ 27 tuổi 57. Hạng E tối đa 55 tuổi đối với nam, 50 tuổi đối với nữ 58.</description>
</item>
<item>
<title>Setting up Gitlab CI for Golang Project</title>
<link>https://hieudoan7.github.io/be/gitlab_ci/</link>
<pubDate>Sun, 21 Aug 2022 09:30:07 +0700</pubDate>
<guid>https://hieudoan7.github.io/be/gitlab_ci/</guid>
<description>After searching how to set up gitlab CI for my golang project for a while (probably 1.5 day). I wanna take some note here to save your time.
The flow is basically talking to gitlab API.
The step is:
1. Get the output
Either from gitlab runner log or artifact
with Golang, It is the output from command: go test ./...
2. Config the regex for gitlab CI to parse the output from all runner</description>
</item>
<item>
<title>The way I choose my next destination in my career</title>
<link>https://hieudoan7.github.io/others/career_decision/</link>
<pubDate>Thu, 21 Apr 2022 08:15:25 +0700</pubDate>
<guid>https://hieudoan7.github.io/others/career_decision/</guid>
<description>Today I&rsquo;m gonna tell you my experiences, my perspective about life in general and work in particularity.
My previous job I graduated from University of Science, a pretigous university in Vietnam with long history of great talents, especially in computer science or IT industry. I even studied in honor program, which is a class of top 50 students in 1000 IT students. Having said that, as a new graduate with the pride of a fancy degree, I feel on top of the world.</description>
</item>
<item>
<title>About me</title>
<link>https://hieudoan7.github.io/about/</link>
<pubDate>Fri, 08 Apr 2022 21:35:43 +0700</pubDate>
<guid>https://hieudoan7.github.io/about/</guid>
<description>Hello you guys, I&rsquo;m very glad you are here, it means that you have crossed my site haha, do you find something interesting here?
Hieu is a man with big heart and kindness, he&rsquo;s considered intelligent by many of his friends. He is funny guy but deep down he&rsquo;s always thinking a lot and it makes his life worse. Now he is learning to let go everything he believes not belong to him, he wants to live a fullfil life by his owe measure not by anyone else.</description>
</item>
<item>
<title>System_design</title>
<link>https://hieudoan7.github.io/interview/system_design/</link>
<pubDate>Thu, 31 Mar 2022 14:27:00 +0700</pubDate>
<guid>https://hieudoan7.github.io/interview/system_design/</guid>
<description>This post is going to be talking about some well-known system design problem
1. Login System Question:</description>
</item>
<item>
<title>Traverse a Tree Recursively and Iteratively</title>
<link>https://hieudoan7.github.io/interview/tree_traversal/</link>
<pubDate>Mon, 28 Mar 2022 20:07:15 +0700</pubDate>
<guid>https://hieudoan7.github.io/interview/tree_traversal/</guid>
<description>In this article, I&rsquo;m going to represent the algorithm of traversing a tree in every orders in both recursive way and especially iterative way.
To put it simply, the iterative way, we will you stack (only 1 stack) to simulate the process.
Assuming that the tree structure is as below:
1struct Node { 2 int value; 3 Node* left; 4 Node* right; 5 Node (int val) { 6 this-&gt;value = val; 7 this-&gt;left = this-&gt;right = NULL; 8 } 9}; 1.</description>
</item>
<item>
<title>Database</title>
<link>https://hieudoan7.github.io/interview/database/</link>
<pubDate>Thu, 03 Mar 2022 10:31:00 +0700</pubDate>
<guid>https://hieudoan7.github.io/interview/database/</guid>
<description>book: Beginning database design solution (Rod Stephens)</description>
</item>
<item>
<title>Common Operating System Questions</title>
<link>https://hieudoan7.github.io/interview/os_qa/</link>
<pubDate>Fri, 25 Feb 2022 20:35:40 +0700</pubDate>
<guid>https://hieudoan7.github.io/interview/os_qa/</guid>
<description>1. What do you mean by an operating system? What are its function? 2. binary semaphore vs. mutex signal mechanism vs. locking mechanism
mutex mutual exclusion object, used for protecting critical resource only the owner process can release the mutex
binary semaphore wait() and signal() //using signaling mechanism hey, i&rsquo;m done, you can carry on wait() and singal() is totally decoupled you can wait() (decrement) on Process B and signal() on process A (increment) semaphore: integer indicating number of &ldquo;toilets&rdquo; available mutex: object acts like a key</description>
</item>
<item>
<title>Setting up Sublime for competitive programming</title>
<link>https://hieudoan7.github.io/others/sublime_setup/</link>
<pubDate>Mon, 10 Jan 2022 10:09:23 +0700</pubDate>
<guid>https://hieudoan7.github.io/others/sublime_setup/</guid>
<description>This tutorial helps to set up a quick building for C plus plus program. The result is you just need to type Ctrl + B to build your C++ file.
All you need is follow these neat steps:
Create your own build system
Tools -&gt; Build System -&gt; New Build System
Copy this script into it. 1{ 2 &#34;cmd&#34;: [&#34;g++&#34;, &#34;-std=c++1z&#34;, &#34;$file&#34;, &#34;-o&#34;, &#34;${file_path}/${file_base_name}&#34;], 3 &#34;file_regex&#34;: &#34;^(..[^:]*):([0-9]+):?([0-9]+)?:? (.*)$&#34;, 4 &#34;working_dir&#34;: &#34;${file_path}&#34;, 5 &#34;selector&#34;: &#34;source.</description>
</item>
<item>
<title>Take_english</title>
<link>https://hieudoan7.github.io/english/take_english/</link>
<pubDate>Sun, 07 Nov 2021 16:08:55 +0700</pubDate>
<guid>https://hieudoan7.github.io/english/take_english/</guid>
<description>source: https://www.talkenglish.com/
I. English Speaking Basic I I&rsquo;m I&rsquo;m in/at/on </description>
</item>
<item>
<title>Words In Reality</title>
<link>https://hieudoan7.github.io/english/word_usage/</link>
<pubDate>Fri, 05 Nov 2021 14:17:18 +0700</pubDate>
<guid>https://hieudoan7.github.io/english/word_usage/</guid>
<description>1. In relation to in relationship to something, in the context of Ex:
The drugs is being studied for possible beneficial effects in relation to migraine headaches. She checked the map to see where Miami in relation to Orlando (~ compared with) I have several comments to make in relation to the subject at hand. (~ reference to) 2. in terms of talk about something then clarifying a specific perspective</description>
</item>
<item>
<title>Grammar Worth Noting</title>
<link>https://hieudoan7.github.io/english/grammar_note/</link>
<pubDate>Fri, 29 Oct 2021 10:13:17 +0700</pubDate>
<guid>https://hieudoan7.github.io/english/grammar_note/</guid>
<description>1. Be of + N The constructor Be Of + Noun is virtually the same as Be + Adj except it sounds more formal. You can think of it as to be of a certain class or of a certain type. Among the best ~ Of the best Ex: The book is of interest Can I be of any help?
2. Was/Were + Doing 3. It vs That(This) both are pronoun IT: without nuance This/that: with nuance (emphasis), also repalce whole phrase/sentence 4.</description>
</item>
<item>
<title>Hieu's Corpus</title>
<link>https://hieudoan7.github.io/english/hieuscorpus/</link>
<pubDate>Tue, 19 Oct 2021 21:56:33 +0700</pubDate>
<guid>https://hieudoan7.github.io/english/hieuscorpus/</guid>
<description>Ronaldo Interview
Surely that must concern you You have never revealed and I don&rsquo;t think you ever intent to reveal The thing that occurred to me while watching the film was You don&rsquo;t owe the world an explanation but you obviously feel that you would owe him the truth Do you ever worry about &hellip; How do you approach that If you are in my shoes, what you gonna do?</description>
</item>
<item>
<title>British Council Learning English for teen</title>
<link>https://hieudoan7.github.io/english/britishcteen/</link>
<pubDate>Tue, 19 Oct 2021 16:01:57 +0700</pubDate>
<guid>https://hieudoan7.github.io/english/britishcteen/</guid>
<description>I. Vocabulary 1. Accessories rucksack scarf bracelet earrings glasses What accesories do you wear? I don&rsquo;t usually wear many accessories. In my daily work, I wear my rucksack to carry my laptop. I also wear a watch on my left wrist, a hap and sunglassess if I need to go outside. I also wear a belt in case my trousers is quite big. In the winter, I wear the scarf to keep my body warm.</description>
</item>
<item>
<title>Pending</title>
<link>https://hieudoan7.github.io/others/pending/</link>
<pubDate>Tue, 19 Oct 2021 10:17:44 +0700</pubDate>
<guid>https://hieudoan7.github.io/others/pending/</guid>
<description>I. Google Wire for dependency injection only one method: wire.Build(struct1.New, struct2.New) normally, struct1 will be dependency of struct2 if struct2.New only required a field in struct1 -&gt; use FieldsOf() after new struct1 if struct2&rsquo;s input is an interface, we need to bind that interface to a struct just created in struct1.New II. Spcli proto spcli proto gen spcli proto publish [&ndash;force] topic_name path/file_name.proto III. Go confusing stuff Empty list is not a nil var a *A // a := &amp;A{} // &amp;{ empty value each fields} Draft orders Item: .</description>
</item>
<item>
<title>ESL - Listening Series</title>
<link>https://hieudoan7.github.io/english/esl/</link>
<pubDate>Sun, 17 Oct 2021 10:17:44 +0700</pubDate>
<guid>https://hieudoan7.github.io/english/esl/</guid>
<description>Intermediate 1. A Student Credit Card source: https://www.esl-lab.com/intermediate/credit-cards/
quiz -&gt; plural: quizzes shred Come over (phrasal verb)
-&gt; to visit someone&rsquo;s home Drop off That is the least I can do Over (preposition) -&gt; during spend yourself in a hole impulse (n) a sudden desire pay thing back </description>
</item>
<item>
<title>The Pain of using smart phone</title>
<link>https://hieudoan7.github.io/others/phone_pain/</link>
<pubDate>Sun, 17 Oct 2021 08:32:38 +0700</pubDate>
<guid>https://hieudoan7.github.io/others/phone_pain/</guid>
<description>It&rsquo;s no secret that blue light harms our vision by damaging the eye&rsquo;s retina.
You can search on the internet and receive thousands of posts related to this problem.
One of them: post from healthline.com
Some of main issues such as:
Dry Eye short-sightedness (myopia) Sooner macular degeneration, leading causes of vision loss. (avg is 60, might 40 if exposing too much to screen) So the best advice is reducing your screen time as much as posible.</description>
</item>
<item>
<title>Part of Speech and its function</title>
<link>https://hieudoan7.github.io/english/partofspeech/</link>
<pubDate>Fri, 15 Oct 2021 15:40:34 +0700</pubDate>
<guid>https://hieudoan7.github.io/english/partofspeech/</guid>
<description>There are 9 basic types called &ldquo;parts of speech&rdquo; or &ldquo;word classes&rdquo;
Verb Noun A noun can perform any of the following five functions: Subject of a verb Object of a verb Complement of a verb (subject complement) Object of a preposition Be in apposition to another noun Pronoun same as noun Adjective noun modifier Adverb
https://dictionary.cambridge.org/grammar/british-grammar/adverbs-functions modifying a verb modifying an adjective modifying another adverb modifying a noun phrase modifying the whole clause modifying the whole sentence Determiner determine the noun (a/an the my) Preposition https://studio.</description>
</item>
<item>
<title>What Brought U Through The Day?</title>
<link>https://hieudoan7.github.io/others/dailywalk/</link>
<pubDate>Fri, 15 Oct 2021 10:20:13 +0700</pubDate>
<guid>https://hieudoan7.github.io/others/dailywalk/</guid>
<description>Have you noticed your feeling at the end of the day?
And you ask yourself what has caused this, did your actions, activities affect your feeling?
Ofcourse, it does.
I. Having a free day isn&rsquo;t such easy like we usually believe? People have different opinions, different feeling on certain problems, so I only speak for myself, on my own experience. First, when I&rsquo;m busy I always dream of having as many day-off as possible for doing nothing.</description>
</item>
<item>
<title>Basic Git Knowledge</title>
<link>https://hieudoan7.github.io/be/git_tutorial/</link>
<pubDate>Fri, 08 Oct 2021 20:54:38 +0700</pubDate>
<guid>https://hieudoan7.github.io/be/git_tutorial/</guid>
<description>Doing the job of a developer, we work with Git on daily basic and sometime we just feel fine and go on with some basic git flow. Have you ran into a git problem and hesitate to make any further steps to fix it? I think Git problem is something we cannot avoid, so why don&rsquo;t we spend a little time to dive deeply into it? Let&rsquo;s get started. Before we can imagine on different scenarios, let&rsquo;s take a look at some basic stuff.</description>
</item>
<item>
<title>[Reading] 01 - 7 Incredible Resources of English Reading</title>
<link>https://hieudoan7.github.io/english/reading_01/</link>
<pubDate>Mon, 13 Sep 2021 17:17:30 +0700</pubDate>
<guid>https://hieudoan7.github.io/english/reading_01/</guid>
<description>FluentU - 7 Incredible Resources Designed to Help You Learn English Reading link: https://www.fluentu.com/blog/english/learn-english-reading-4/ 1. The more that you read, the more things you will know
-&gt; The more + S V (simple tense), the more S + will + V.
2. Most people are familiar with St
3. He couldn&rsquo;t have been more right!
4. The fact is that whether you are a natural reading lover like myself or merely read when you have to.</description>
</item>
<item>
<title>SSL/TLS Certificate</title>
<link>https://hieudoan7.github.io/be/ssl_cert/</link>
<pubDate>Sun, 18 Jul 2021 09:59:19 +0700</pubDate>
<guid>https://hieudoan7.github.io/be/ssl_cert/</guid>
<description>SSL/TLS Certificate Explanation 18/07/2021
After spending a few days researching the SSL/TLS certificate, I want to take a note for myself and show what I have understood in this blog post. Leave a comment if you have any disagreements or concerns about this topic.
I. What is SSL Certificate? First, SSL is the abbreviation of Secure Socket Layer and TLS is the abbreviation of Transport Layer Security which is the upgradation of SSL.</description>
</item>
<item>
<title>First_article</title>
<link>https://hieudoan7.github.io/english/first_article/</link>
<pubDate>Mon, 24 May 2021 10:40:47 +0700</pubDate>
<guid>https://hieudoan7.github.io/english/first_article/</guid>
<description>LOL 24/05/2021 This is the first article to help Hd7 improve his active english skill, ie writing and speaking not just passive english skill such as listening and reading. Yeah here we go, everystep (though small) make a huge impact in the future.</description>
</item>
<item>
<title>Hieu test</title>
<link>https://hieudoan7.github.io/others/test/</link>
<pubDate>Sun, 23 May 2021 17:12:47 +0700</pubDate>
<guid>https://hieudoan7.github.io/others/test/</guid>
<description>Hieu test hugo to come back stronger yes here we go again
test insert image in hugo</description>
</item>
<item>
<title>Linux Useful Commands</title>
<link>https://hieudoan7.github.io/be/useful_command/</link>
<pubDate>Thu, 25 Feb 2021 09:50:59 +0700</pubDate>
<guid>https://hieudoan7.github.io/be/useful_command/</guid>
<description>Useful Command Lines 25/02/2021
I. Cat Read a text-like file
Example:
1$ cat file.txt | grep &#34;pattern&#34; | -A number_of_after_line -B number_of_before_line -C both_before_and_after_lines II. Find Find one or more files base on pattern
return all the file and directory locate in a dir 1$ find ~/Hd7/ return only file (or dir) 1$ find ~/Hd7/ -type f or
1$ find ~/Hd7/ -type d return a file with specific name 1$ find .</description>
</item>
<item>
<title>Matrix Exponentiation</title>
<link>https://hieudoan7.github.io/algos/matrix_exponentiation/</link>
<pubDate>Wed, 22 Jan 2020 13:57:57 +0700</pubDate>
<guid>https://hieudoan7.github.io/algos/matrix_exponentiation/</guid>
<description>Matrix Exponentiation 22/01/2020
I. Linear Equation Đề bài: Giải hệ thức đệ quy:
$$\begin{cases}f_i = c_0 + c_1 f_{i-1} + c_2 f_{i-2} + &hellip; + c_k f_{i-k}\\f_0, f_1, &hellip;, f_{k-1}\end{cases}$$
Giải:
Ma trận xuất phát điểm: $F_k$ (k+1) x 1
$$\begin{bmatrix}f_0 \\f_1 \\ &hellip;\\f_{k-1} \\1 \end{bmatrix} $$
Ma trận chuyển tiếp: (Transition) $T_{(k+1).(k+1)}$
$$\begin{bmatrix}0 &amp; 1 &amp; 0 &amp; &hellip; &amp; 0 &amp; 0 \\0 &amp; 0 &amp; 1 &amp;&hellip;&amp; 0 &amp; 0 \\ &hellip; \\c_k &amp; c_{k-1} &amp; c_{k-2} &amp; &hellip; &amp; c_1 &amp; c_0\end{bmatrix}$$</description>
</item>
<item>
<title>On the way to SEA VN</title>
<link>https://hieudoan7.github.io/interview/sea/</link>
<pubDate>Mon, 13 Jan 2020 18:41:14 +0700</pubDate>
<guid>https://hieudoan7.github.io/interview/sea/</guid>
<description>On the way to SEA VN 13/01/2020
Hôm nay mình rảnh nhân dịp nghỉ tết (19 âm lịch rồi) nên viết lại một chút quá trình phỏng vấn SEA VN để lưu lại, cũng như biết đâu giúp được 1 số bạn.
Quá trình phỏng vấn bao gồm 4 rounds
Round 0: Làm bài test trên giấy Round 1: Face to Face technical interview 1 Round 2: Face to Face technical interview 2 Round 3: Yes/no round (:v) I.</description>
</item>
<item>
<title>Segment Tree</title>
<link>https://hieudoan7.github.io/algos/segment_tree/</link>
<pubDate>Sat, 28 Dec 2019 22:46:31 +0700</pubDate>
<guid>https://hieudoan7.github.io/algos/segment_tree/</guid>
<description>Segment Tree 28/12/2019
I. Mục đích: Giúp truy xuất giá trị trên 1 đoạn (segment) nhanh chóng và update giá trị nhanh chóng. Nhanh ở đây là $O(log\ n)$. Truy xuất ở đây có thể là tổng, phần tử nhỏ nhất, phần tử lớn nhất, &hellip; .
II. Cấu tạo chung của 1 segment tree Xét một array $a[n]$ (từ $0..n-1$), ta build $1$ cái cây quản lý mảng a.</description>
</item>
<item>
<title>Lowest Common Ancestor (LCA)</title>
<link>https://hieudoan7.github.io/algos/lca/</link>
<pubDate>Tue, 17 Dec 2019 14:48:39 +0700</pubDate>
<guid>https://hieudoan7.github.io/algos/lca/</guid>
<description>Lowest Common Ancestor (LCA) 17/12/2019
I. Bài toán Trả lời nhiều queries của bài toán tìm LCA 2 nodes u, v trong 1 rooted tree.
Lưu ý u, v phải nằm trong 1 cái tree, điều đó đảm bảo every nodes have only 1 parent (aka $2^0$-th parent).
II. Ý tưởng Có nhiều cách tìm LCA, mình sẽ trình bày cách phổ biến nhất có tên là binary raise (or binary lifting).</description>
</item>
<item>
<title>Tree's Theorem</title>
<link>https://hieudoan7.github.io/algos/tree_theorem/</link>
<pubDate>Sat, 02 Nov 2019 23:12:30 +0700</pubDate>
<guid>https://hieudoan7.github.io/algos/tree_theorem/</guid>
<description>Tree&rsquo;s Theorem 01/11/2019
I. Các cấu trúc cây cơ bản 1. Binary Tree Mỗi node trong cây có tối đa $2$ con.
2. Binary Search Tree Là Binary Tree + giá trị của node luôn lớn hơn giá trị của node con trái và bé hơn giá trị của node con phải.
3. AVL Tree (height balanced binary tree) Là self balancing Binary Search Tree + chênh lệch giữa cây con trái và cây con phải tại bất kì node nào luôn không vượt quá $1$.</description>
</item>
<item>
<title>Sorting</title>
<link>https://hieudoan7.github.io/algos/sorting/</link>
<pubDate>Sat, 02 Nov 2019 14:11:28 +0700</pubDate>
<guid>https://hieudoan7.github.io/algos/sorting/</guid>
<description>Sorting Algorithm 02/11/2019
This post is going to give you some interesting algorithm ralating sorting elements.
Problem Sorting an array $a$ consists of $n$ elements in increasing order.
I. $O(n^2)$ Algorithm 1. Interchange Sort 1for(int i=0; i&lt;n; i++){ 2 for(int j=i+1; j&lt;n; j++){ 3 if (a[j] &lt; a[i]) swap(a[j], a[i]); 4 } 5} 2. Bubble Sort Từng phần tử nổi lên như bong bóng vậy đó.
1for(int i=n-1; i&gt;0; i--){ 2 for(int j=1; j&lt;=i; j++){ 3 if (a[j] &lt; a[j-1]) swap(a[j], a[j-1]); 4 } 5 } Ngoài ra còn có Insertion Sort, Selection Sort, Shaker Sort.</description>
</item>
<item>
<title>Operator System</title>
<link>https://hieudoan7.github.io/interview/operator_system/</link>
<pubDate>Tue, 29 Oct 2019 23:11:03 +0700</pubDate>
<guid>https://hieudoan7.github.io/interview/operator_system/</guid>
<description>Operator System Questions for Interview 29/10/2019
Hệ điều hành là 1 chương trình quản lý phần cứng và cấp phát tài nguyên một cách phù hợp cho các chương trình.
I. Process (Tiến trình) 1. Tiến trình, tiểu trình? Tiến trình là một chương trình máy tính đang thực thi.
Tiểu trình (thread) là một đơn vị thực thi độc lập mà CPU có thể điều phối được. Thông thường, một Tiến trình gồm nhiều Tiểu trình.</description>
</item>
<item>
<title>Computer Network</title>
<link>https://hieudoan7.github.io/interview/computer_network/</link>
<pubDate>Mon, 28 Oct 2019 21:27:43 +0700</pubDate>
<guid>https://hieudoan7.github.io/interview/computer_network/</guid>
<description>Computer Network Questions for Interview. 28/10/2019
1. DNS là gì, hoạt động như thế nào? DNS là Domain Name System: Hệ thống chuyển đổi domain name thành địa chỉ IP.
host: yahoo.com -&gt; search catch -&gt; miss -&gt; Resolver (ISP or nhà cc mạng: VIETEL (người đại diên)) -&gt; ROOT server -&gt; .com server -&gt; yahoo.com server -&gt; đưa cho 1 IP server (rảnh) để mà về tải. Remark: DNS using port 53.</description>
</item>
<item>
<title>All you need to know about Subset Sum Problem</title>
<link>https://hieudoan7.github.io/algos/subset_sum/</link>
<pubDate>Fri, 25 Oct 2019 20:14:31 +0700</pubDate>
<guid>https://hieudoan7.github.io/algos/subset_sum/</guid>
<description>All You need to know about Subset Sum Problem 25/10/2019
Bài toán: Cho 1 multiset $S = \{a_1, a_2, &hellip;, a_n\}$, tìm 1 subset of $S$ thỏa điều kiện $P$.
Naive Solution: $\rightarrow O(2^n * n)$
Ta sinh tất cả các subset của $S$ $(O(2^n))$, sau đó duyệt qua từng subset $(O(n))$ để kiểm tra xem nó có thỏa điều kiện $P$ hay không.
Nó thực sự là 1 bài toán NP-Complete nên ta chỉ có thể giải trong thời gian exponential.</description>
</item>
<item>
<title>Graph Traversal</title>
<link>https://hieudoan7.github.io/algos/graph_traversal/</link>
<pubDate>Thu, 12 Sep 2019 20:25:41 +0700</pubDate>
<guid>https://hieudoan7.github.io/algos/graph_traversal/</guid>
<description>Graph Traversal 12/09/2019
We discuss about the way we traverse a graph or a tree.
Assuming we are using adjacent list to represent a graph.
I. Depth-First Search (DFS) Idea: Đi sâu rồi quần lại.
1. Implement 1vector&lt;int&gt; g[N]; //or vector&lt;vector&lt;int&gt;&gt; g; 2bool vis[N]; 3void dfs(int v){ //vertex 4 vis[v] = true; 5 for(auto u:g[v]){ //always for u =)) 6 if (!vis[u]) dfs(u); 7 } 8} 9//in main 10for(int i=0; i&lt;n; i++){ 11 if (!</description>
</item>
<item>
<title>Minimum Spanning Tree</title>
<link>https://hieudoan7.github.io/algos/minimum_spaning_tree/</link>
<pubDate>Mon, 05 Aug 2019 20:25:45 +0700</pubDate>
<guid>https://hieudoan7.github.io/algos/minimum_spaning_tree/</guid>
<description>Minimum Spanning Tree (Cây khung nhỏ nhất)
05/08/2019
I. Definition Tree: (Cây) là đồ thị vô hướng (undirected), liên thông (connected) và không có chu trình (acyclic).
Các tính chất của cây: Cây n nodes luôn có n-1 cạnh Mỗi cạnh đều là cầu Thêm 1 cạnh bất kì sẽ tạo nên chu trình. Spanning Tree: (Cây khung) là Cây chứa tất cả các nodes, so nó luôn có n-1 cạnh.</description>
</item>
<item>
<title>Solving Recursive Sequence using Generating Function</title>
<link>https://hieudoan7.github.io/algos/solving_recursive_using_generating_fuction/</link>
<pubDate>Fri, 02 Aug 2019 22:11:07 +0700</pubDate>
<guid>https://hieudoan7.github.io/algos/solving_recursive_using_generating_fuction/</guid>
<description>Solving Recursive Sequence using Generating Function 02/08/2019
I. Definition Hàm sinh là cái hàm mà nén 1 dãy số $\{a_n\}, n\geq 0$ có quy luật thành một cái tổng $$\sum_{n=0}^\infty a_nx^n$$ Hệ số của $x^n$ chính là số hạng $a_n$ trong dãy $\{a_n\}, n\geq 0$.
II. Several Formulas Generating Function III. Solving Recursive Sequence. Examples: This example is my friend &lsquo;s question in his interview, so I just note it. Ngoài ra còn có hàm sinh mũ cũng giải các hệ thức đệ quy phức tạp hơn.</description>
</item>
<item>
<title>Articulation Point (Cut Point) & Bridge</title>
<link>https://hieudoan7.github.io/algos/ap_bridges/</link>
<pubDate>Wed, 31 Jul 2019 22:01:16 +0700</pubDate>
<guid>https://hieudoan7.github.io/algos/ap_bridges/</guid>
<description>Articulation Point &amp; Bridge 31/07/2019
I. Definition Ta xét trong undirected graph.
Articulation Point (đỉnh khớp): Là đỉnh mà nếu cắt bỏ đi sẽ làm disconnect graph (trong connected graph) còn đối với disconnected graph thì nó làm tăng số connected component. Bridge: Là cạnh mà nếu bỏ đi &hellip; (giống khớp) II. Finding Articulation Point 1. Thuật toán tầm thường Với mỗi đỉnh trong graph, ta thử cắt bỏ đi và đếm số thành phần liên thông.</description>
</item>
<item>
<title>Greatest Common Divisor using Eucidean Algorithm</title>
<link>https://hieudoan7.github.io/algos/gcd_euclid/</link>
<pubDate>Thu, 11 Jul 2019 21:49:24 +0700</pubDate>
<guid>https://hieudoan7.github.io/algos/gcd_euclid/</guid>
<description>Greatest Common Divisor using Euclidean Algorithm 11/07/2019
I. Implementation 1typedef long long ll; 2ll gcd (ll a, ll b){ 3 return b==0? a : gcd(b, a%b); //phải hỏi b==0? chứ b=0 thì làm sao a chia dư 0 được. 4} II. Interpretation Thuật toán Euclid tìm ước chung lớn nhất giữa 2 số $a, b$.
Không mất tính tổng quát, giả sử $a &gt; b$.
Nhìn hình, ta thấy, $gcd(a, b) = x$ khi và chỉ khi $x$ là ước của $a$, $x$ cũng là ước của $b$ và $x$ lớn nhất.</description>
</item>
<item>
<title>KMP Algorithm</title>
<link>https://hieudoan7.github.io/algos/kmp-algorithm/</link>
<pubDate>Wed, 10 Jul 2019 22:42:22 +0700</pubDate>
<guid>https://hieudoan7.github.io/algos/kmp-algorithm/</guid>
<description>Knuth-Morris-Pratt algorithm 10/07/2019
I. Bài toán: Cho chuỗi Text $T$ (length = $n$) và Pattern $P$ (length = $m$). Tìm số lần xuất hiện của $P$ trong $T$.
$\Rightarrow$ Naive Solution:
Tại mỗi vị trí $i$ trong $T$, ta so sánh nó với $P$.
code chơi thôi:
1int cnt = 0; 2for (int i = 0; i &lt;= n-m; i++){ 3 bool is_match = true; 4 for (int j = 0; j &lt; m; j++){ 5 if (P[j] == T[i+j]) continue; 6 is_match = false; 7 break; 8 } 9 if (is_match) cnt++; 10} $$\Rightarrow O(n*m) $$</description>
</item>
<item>
<title>Floyd-Warshall Algorithm</title>
<link>https://hieudoan7.github.io/algos/floyd-warshall_algorithm/</link>
<pubDate>Tue, 09 Jul 2019 21:06:45 +0700</pubDate>
<guid>https://hieudoan7.github.io/algos/floyd-warshall_algorithm/</guid>
<description>Floyd-Warshall algorithm 09/07/2019
I. Mục đích All pair shortest path
Tìm đường đi ngắn nhất giữa tất cả các cặp đỉnh.
II. Ý tưởng: Quy hoạch động dựa vào đỉnh trung gian.
Với đỉnh trung gian đang xét là $k$, thì những $shortest\_path$ mà có các đỉnh trung gian thuộc $[1..k]$ sẽ được tìm thấy (kết quả cuối cùng luôn), còn những cái path kia thì có ngắn hơn nhưng chưa phải ngắn nhất vì nó còn đường ngắn hơn là đi qua đỉnh trung gian mà ta chưa cover tới.</description>
</item>
<item>
<title>Dijkstra Algorithm</title>
<link>https://hieudoan7.github.io/algos/dijistra_algorithm/</link>
<pubDate>Tue, 09 Jul 2019 00:06:06 +0700</pubDate>
<guid>https://hieudoan7.github.io/algos/dijistra_algorithm/</guid>
<description>Dijkstra Algorithm 08/07/2019
I. Mục đích: Tìm đường đi ngắn nhất từ 1 node (starting node) đến tất cả các nodes còn lại.
Nhược điểm: Kết quả SAI khi đồ thị cạnh âm chứ chưa cần có mạch âm.
Ưu điểm: So với Bellman-ford, Dijistra hiệu quả hơn vì chỉ duyệt qua các cạnh đúng 1 lần.
II. Ý tưởng: Luôn lan truyền đến node gần nhất với starting node x.</description>
</item>
<item>
<title>Bellman-Ford Algorithm</title>
<link>https://hieudoan7.github.io/algos/bellman-ford_algorithm/</link>
<pubDate>Mon, 08 Jul 2019 21:43:13 +0700</pubDate>
<guid>https://hieudoan7.github.io/algos/bellman-ford_algorithm/</guid>
<description>Bellman-Ford Algorithm 08/07/2019
I. Mục đích Tìm đường đi ngắn nhất từ 1 node (starting node) đến tất cả các nodes còn lại.
Ưu điểm: Có thể phát hiện mạch âm
II. Ý tưởng: Gọi $distance[i]$ là đường đi ngắn nhất từ đỉnh $x$ (starting node) đến đỉnh i ($distance[x] = 0$)
Sau lần round 1: những đỉnh $i$ kề $x$ sẽ xác định được $distance[i]$ (final value luôn đó)</description>
</item>
<item>
<title>Z-function</title>
<link>https://hieudoan7.github.io/algos/z-function/</link>
<pubDate>Sun, 07 Jul 2019 14:27:00 +0700</pubDate>
<guid>https://hieudoan7.github.io/algos/z-function/</guid>
<description>th, td { padding: 1.0rem; } table, th, td { border: 2px solid black; } String Processing 18/04/2019
Cho 2 xâu P (pattern) và S (string). Mộ số bài toán
Tìm vị trí xuất hiện đầu tiên của P trong S Đếm số lần xuất hiện P trong S Cho S, tìm P ngắn nhất để repeat P nhiều lần ta được S &hellip; I. Z-function 1.</description>
</item>
<item>
<title>Polish Notation</title>
<link>https://hieudoan7.github.io/algos/polishnotation/</link>
<pubDate>Sat, 29 Jun 2019 11:20:28 +0700</pubDate>
<guid>https://hieudoan7.github.io/algos/polishnotation/</guid>
<description>Polist Notation 29/06/2019
I. Kí pháp Balan là gì? (What is Polish Notation) Kí pháp Balan là một dạng viết khác của biểu thức toán học.
Balan tiền tố (prefix): Đưa các toán tử lên đầu Balan ngược: Đưa các toán tử ra sau cùng Trong kí pháp Balan, các dấu ngoặc bị lược bỏ
Ví dụ: Xét biểu thức: $3 + 5*(6-3) + 1$
Balan: $ + + 3 * 5 - 6\ 3\ 1$ Balan ngược: $3\ 5\ 6\ 3 - * + 1 +$ Để xây dựng được kí pháp Balan, ta dùng cây biểu thức:</description>
</item>
<item>
<title>Fenwick Tree - Binary Indexed Tree</title>
<link>https://hieudoan7.github.io/algos/fenwicktree/</link>
<pubDate>Tue, 25 Jun 2019 13:25:20 +0700</pubDate>
<guid>https://hieudoan7.github.io/algos/fenwicktree/</guid>
<description>Binary Indexed Tree (Fenwick Tree) 24/06/2019
Định nghĩa: Fenwick Tree (Binary Indexed Tree) là một CTDL với n node (n+1 nodes với node gốc bù nhìn) chứa thông tin (thường là tổng cộng dồn) về các phần tử trong đoạn (i-(i&amp;-i), i] (mảng tính từ $1$)
Nhận xét: Cây getSum vs cây Update khác nhau: in GetSum: parent(i) = i-(i&amp;-i) in Update: parent(i) = i+(i&amp;-i) Mục đích: Mục đích cây này là để tính range sum và khi update 1 phần tử trong mảng a thì các range sum involved cũng được update với chi phí thấp.</description>
</item>
<item>
<title>Kosaraju's Algorithm Intuition</title>
<link>https://hieudoan7.github.io/algos/kosaraju/</link>
<pubDate>Tue, 18 Jun 2019 15:01:41 +0700</pubDate>
<guid>https://hieudoan7.github.io/algos/kosaraju/</guid>
<description>Kosaraju &lsquo;s Algorithms 17/06/2019
I. DFS Tree Output của thuật toán DFS là 1 cây khung (spanning tree) Tất cả các cạnh của đồ thị gốc sẽ được chia làm 4 loại trong DFS spanning Tree:
Tree Edge (sometimes Tree Edge được xếp vào Forward Edge) Forward Edge Back Edge Cross Edge Example If the original graph is undirected then all of its edges are tree edge or black edge</description>
</item>
<item>
<title>Hugo Tutorial</title>
<link>https://hieudoan7.github.io/others/hugo-tutorial/</link>
<pubDate>Fri, 19 Apr 2019 15:01:41 +0700</pubDate>
<guid>https://hieudoan7.github.io/others/hugo-tutorial/</guid>
<description>I. Install Hugo &amp; Setup Theme 2 best tutorial about hugo
part 1 part 2
Về cơ bản, chúng ta host blog lên github sẽ tạo 2 repository
Repo 1: hieudoan7: chứa các file config của hugo, content, nói chung tất tần tật. Repo 2: hieudoan7.github.io: repo này chứa file html để render lên web Chú ý: dateformat trong file config.toml (ở thư mục gốc, thư mục mà ta có thể sử dụng hugo command) phải để ở ngày 2.</description>
</item>
<item>
<title>The Fine Art of Small Talk</title>
<link>https://hieudoan7.github.io/others/the-fine-art-of-small-talk/</link>
<pubDate>Fri, 19 Apr 2019 00:00:00 +0000</pubDate>
<guid>https://hieudoan7.github.io/others/the-fine-art-of-small-talk/</guid>
<description>Small Talk Note 05/04/2019
Em học được gì qua nội dung quyển sách? Contents Chapter 1: What&rsquo;s Big Deal About Small Talk? Chapter 2: Get Over Your Mom &lsquo;s Intentions Chapter 3: Take the Plunge: Start a Conversation! Chapter 4: Keep the Conservation Going! Chapter 5: Let&rsquo;s Give &lsquo;Em Something to Talk About Chapter 6: Hearing Aids and Listening Devices Chapter 7: Prevent Pregmant Pauses with Preparationg Chapter 8: Conservation Clout Chapter 9: Crimes and Misdemeanors Chapter 10: The Graceful Exit Chapter 11: The Conservation Ball Is in Your Court!</description>
</item>
</channel>
</rss>