- 139
- 14 571 124
Errichto Algorithms
Poland
Registrace 27. 09. 2018
Algorithms, competitive programming, coding interviews. I make educational videos and coding live streams, always sharing my thought process.
My name is Kamil Dębowski (or Errichto) and I'm quite good at competitive programming. I'm a finalist of multiple big programming competitions like ICPC, Facebook Hacker Cup and Google Code Jam (even got 2nd place in 2018). I also organize competitions, which means inventing and preparing problems.
My name is Kamil Dębowski (or Errichto) and I'm quite good at competitive programming. I'm a finalist of multiple big programming competitions like ICPC, Facebook Hacker Cup and Google Code Jam (even got 2nd place in 2018). I also organize competitions, which means inventing and preparing problems.
Prefix Sums - Problems, Code in C++ & Python
Prefix sums are the sums of the first K elements in an array. You can use them to quickly get the range sum and solve many other problems.
Range Sum - cses.fi/problemset/task/1646 or www.spoj.com/problems/CSUMQ/
Most Frequent - www.geeksforgeeks.org/queries-to-print-the-character-that-occurs-the-maximum-number-of-times-in-a-given-range/
Range Increase - www.hackerrank.com/challenges/crush/problem
Subarray Sum Equals K - leetcode.com/problems/subarray-sum-equals-k/
Product - leetcode.com/problems/product-of-array-except-self/
CF article - codeforces.com/blog/entry/86420
I stream on Twitch - www.twitch.tv/errichto
2nd YT channel - czcams.com/users/errichto2
Range Sum - cses.fi/problemset/task/1646 or www.spoj.com/problems/CSUMQ/
Most Frequent - www.geeksforgeeks.org/queries-to-print-the-character-that-occurs-the-maximum-number-of-times-in-a-given-range/
Range Increase - www.hackerrank.com/challenges/crush/problem
Subarray Sum Equals K - leetcode.com/problems/subarray-sum-equals-k/
Product - leetcode.com/problems/product-of-array-except-self/
CF article - codeforces.com/blog/entry/86420
I stream on Twitch - www.twitch.tv/errichto
2nd YT channel - czcams.com/users/errichto2
zhlédnutí: 37 856
Video
I Lost In Google Hash Code 2022
zhlédnutí 61KPřed 2 lety
Going through my mistakes in GHC 2022 qualification round. [ad] Reply Code Challenge: replychallenges.com/346 Google Hash Code qualification round: codingcompetitions.withgoogle.com/hashcode/round/00000000008caae7 We should have coordinated better. I incorrectly thought that optimizing the order of doing projects is a bad idea. It's sad that strategic mistakes would be so easy to avoid. And usi...
C++ Caesar Cipher (ASCII Codes) | Algo for Beginners
zhlédnutí 46KPřed 2 lety
Caesar Cipher shifts every character by a constant. It's easy to code if we use ASCII values. Train&Win high school contest: challenges.reply.com/tamtamy/challenge/2022-teen-train-win-1 School registration: replychallenges.com/TrainAndWinProgramme2022 Homework: Day 1 P03 P04 P07 P09, hit "join" on the right to register and submit solutions codeforces.com/group/yg7WhsFsAp/contests 0:00 ASCII cod...
C++ For-Loops Range | Algorithms For Beginners
zhlédnutí 55KPřed 2 lety
Not sure if you should use N-1 or N-2? Let's practice how to use indices in algorithmic problems. CF Football codeforces.com/problemset/problem/96/a CSES Repetitions cses.fi/problemset/task/1069 LC Repeated DNA Seq leetcode.com/problems/repeated-dna-sequences/ 0:00 3 in a row 2:46 K in a row 4:34 code 7:49 homework I stream on Twitch: www.twitch.tv/errichto
Leetcode Biweekly #56 (2nd Place)
zhlédnutí 82KPřed 2 lety
I almost won leetcode.com/contest/biweekly-contest-56 Live-stream with more detailed explanation of Q3 and Q4 czcams.com/video/LBB2E69Qxc8/video.html 0:00 Q1. Count Square Sum Triples 0:46 Q2. Nearest Exit from Maze 4:56 Q3. Sum Game 10:09 Q4. Minimum Cost to Reach Destination 14:38 Results Subscribe for more educational videos on algorithms, coding interviews and competitive programming. - Git...
Google Code Jam 2021 R3 Screencast
zhlédnutí 40KPřed 2 lety
No-commentary screencast of GCJ Round 3, sorry about the sound codingcompetitions.withgoogle.com/codejam/round/0000000000436142 Coding live streams - www.twitch.tv/errichto How to practice? - github.com/Errichto/youtube/wiki/How-to-practice? Subscribe for more educational videos on algorithms, coding interviews and competitive programming.
Kickstart 2021 Round C (1st place)
zhlédnutí 216KPřed 2 lety
I won Google Kick Start 2021 Round C. Watch my screencast with commentary and post-analysis. codingcompetitions.withgoogle.com/kickstart/round/0000000000435c44 0:00 - Intro 0:35 - A 9:40 - B 16:16 - C 26:56 - D 52:06 - D, first submit 57:54 - done & solutions Coding live streams - www.twitch.tv/errichto How to practice? - github.com/Errichto/youtube/wiki/How-to-practice? Subscribe for more educ...
Google Code Jam Round 2 Screencast (full score!)
zhlédnutí 41KPřed 3 lety
codingcompetitions.withgoogle.com/codejam/round/0000000000435915 Subscribe for more educational videos on algorithms, coding interviews and competitive programming. - Github repository: github.com/Errichto/youtube - Live streams on 2nd YT channel and on Twitch: czcams.com/users/errichto2 & www.twitch.tv/errichto - FB and Twitter: errichto & errichto - Frequently Asked Q...
Google Code Jam 2021 Round 1B (6th place)
zhlédnutí 187KPřed 3 lety
My screencast and commentary of GCJ 2021 1B. Problems and leaderboard: codingcompetitions.withgoogle.com/codejam/round/0000000000435baf 0:00 A. Broken Clock 17:50 B. Subtransmutation 34:12 wrong submission 36:38 C. Digit Blocks 56:52 Summary Coding live streams - www.twitch.tv/errichto FAQ - github.com/Errichto/youtube/wiki/FAQ Subscribe for more educational videos on algorithms, coding intervi...
Sparse Table & RMQ (Range Minimum Query)
zhlédnutí 71KPřed 3 lety
Tutorial on Sparse Table data structure. We use it to solve Range Minimum Query by first storing minimum for every interval with a length equal to some power of 2. problem links: www.spoj.com/problems/RMQSQ/ & cses.fi/problemset/task/1647 code github.com/Errichto/youtube/blob/master/rmq_sparse_table.cpp Coding live streams - www.twitch.tv/errichto FAQ - github.com/Errichto/youtube/wiki/FAQ Dsic...
Google Code Jam 2020 1C Practice
zhlédnutí 18KPřed 3 lety
I'm solving an old GCJ round (2020 1C) in order to prepare for upcoming round 1 of GCJ 2021. Contest link: codingcompetitions.withgoogle.com/codejam/round/000000000019fef4 0:00 Intro 1:31 A. Overexcited Fan 9:58 B. Overrandomized 24:07 C. Oversized Pancakes 33:00 coding Test Set 1 (D = 3) 37:23 solving Test Set 2 46:47 coding Test Set 2 52:42 submit & summary Coding live streams - www.twitch.tv...
LCA - Lowest Common Ancestor
zhlédnutí 57KPřed 3 lety
Tutorial on LCA algorithm. We use Binary Lifting to get O(N*log(N)) preprocessing and O(log(N)) to find the lowest common ancestor of two nodes in a tree. Binary Lifting video czcams.com/video/oib-XsjFa-M/video.html SPOJ problem www.spoj.com/problems/LCASQ/ code github.com/Errichto/youtube/blob/master/lca.cpp Two homework problems: 1) Answer queries "find distance between two given nodes U and ...
Binary Lifting (Kth Ancestor of a Tree Node)
zhlédnutí 91KPřed 3 lety
Tutorial on binary lifting (also called jump pointers). We find k-th ancestor of a node in O(log(N)). Problem link leetcode.com/problems/kth-ancestor-of-a-tree-node/ Final code github.com/Errichto/youtube/blob/master/leetcode/1483-kth-ancestor.cpp Coding live streams - www.twitch.tv/errichto FAQ - github.com/Errichto/youtube/wiki/FAQ Subscribe for more educational videos on algorithms, coding i...
Google Code Jam 2021 Qualification Round Solutions & Live Commentary
zhlédnutí 54KPřed 3 lety
My screencast and commentary of GCJ 2021 Qualification Round. Problems and leaderboard: codingcompetitions.withgoogle.com/codejam/round/000000000043580a 0:00 A. Reversort 3:37 C. Reversort Engineering 12:40 B. Moons and umbrellas 17:55 D. Median Sort 1:26:18 E. Cheating Detection 1:55:37 Results, Summary Coding live streams - www.twitch.tv/errichto FAQ - github.com/Errichto/youtube/wiki/FAQ Sub...
Chinese Remainder Theorem, 2-minute Method
zhlédnutí 78KPřed 3 lety
A simple method for Chinese Remainder Theorem (solving system of congruences), without any modular inverse. Here's my code for Advent of Code day 13 github.com/Errichto/youtube/blob/master/AOC-2020/13-search/shuttle2.cpp 0:00 Example 1 2:02 In General 2:56 LCM 4:05 Big Example 7:31 Extra Understanding Subscribe for more educational videos on algorithms, coding interviews and competitive program...
Hardest Advent of Code 2020 Problem (day 20 Jigsaw, backtracking)
zhlédnutí 40KPřed 3 lety
Hardest Advent of Code 2020 Problem (day 20 Jigsaw, backtracking)
Bot Tournament | CodinGame Fall Challenge 2020
zhlédnutí 54KPřed 3 lety
Bot Tournament | CodinGame Fall Challenge 2020
Yandex Cup Algo 2020 Finals - Screencast & Commentary
zhlédnutí 52KPřed 3 lety
Yandex Cup Algo 2020 Finals - Screencast & Commentary
2nd Place in Google Kickstart 2020 G with keyboard-cam and commentary
zhlédnutí 178KPřed 3 lety
2nd Place in Google Kickstart 2020 G with keyboard-cam and commentary
DFS With Slashes - Coding Interview Stream Highlights
zhlédnutí 26KPřed 3 lety
DFS With Slashes - Coding Interview Stream Highlights
Algo Talk: Railroads from Facebook Hacker Cup
zhlédnutí 23KPřed 3 lety
Algo Talk: Railroads from Facebook Hacker Cup
Facebook Hacker Cup 2020 R3 (I Got To Finals!)
zhlédnutí 586KPřed 3 lety
Facebook Hacker Cup 2020 R3 (I Got To Finals!)
Facebook Hacker Cup 2020 R2 (7th place)
zhlédnutí 32KPřed 3 lety
Facebook Hacker Cup 2020 R2 (7th place)
Facebook Hacker Cup 2020 R1 (full score, part 2)
zhlédnutí 132KPřed 3 lety
Facebook Hacker Cup 2020 R1 (full score, part 2)
Facebook Hacker Cup 2020 R1 (full score, part 1)
zhlédnutí 77KPřed 3 lety
Facebook Hacker Cup 2020 R1 (full score, part 1)
Matrix Exponentiation Coding (Part 2/2, HARD)
zhlédnutí 32KPřed 3 lety
Matrix Exponentiation Coding (Part 2/2, HARD)
Facebook Hacker Cup 2020 Qual' (2nd place)
zhlédnutí 2,9MPřed 3 lety
Facebook Hacker Cup 2020 Qual' (2nd place)
Matrix Exponentiation Coding (Part 1/2)
zhlédnutí 35KPřed 3 lety
Matrix Exponentiation Coding (Part 1/2)
What happened to this guy is he still in Competitive programming
nice
This is him messing with computers since childhood, parents forced him through hard shooling math is essential for this type of programming
more videoss please
I used to waste a lot of time while solving a problem. I will stay on the problem for 1 day that was huge waste. This is a good advice think for about 20 minutes.
You are an amazing teacher
THANK YOU
hey, ty for this video <3
A wiesz jak zaprojektować duży system z użyciem DDD?
Да говори нормально, все свои
Can taking modulo M ensure the program would have produced correct results if we didn't take the modulo? As taking modulo with M will only produce results in [0, M-1] range. So, there might be some case, where two implementations (one is correct, and another is wrong) of the same problem might give the same results when we take the modulo and can bypass the test cases.
Love this video
I've been writing software for years and haven't interviewed in about 10. This is never used on the job so why is it tested for during interviews? Wouldn't system design make much more sense?
your article is just awesome
first time seeing this, proud of myself that i was able to come up with the alternative prefix sum algorithm within minutes. Never heard of kadane's algorithm before.
Can any one help me how can i apply binary search here ? An image is represented by a binary matrix with 0 as a white pixel and 1 as a black pixel. The black pixels are connected, i.e., there is only one black region. Pixels are connected horizontally and vertically. Given the location (x, y) of one of the black pixels, return the area of the smallest (axis-aligned) rectangle that encloses all black pixels. [ [0,1,0,1,0] [0,1,0,1,0], [1,1,0,1,0], [0,1,1,1,0] ] output = 16
The last problem "Count Coin change" can be solved in a much simpler way using 1D array: dp[0] = 1; for x in nums: for i from (1 to x): dp[ i ] += dp[ i - x ]; print dp[x]
This video is What i have WAITED to see for YEARS . You are FIRE 🔥
I like more the first one, for me it's the most important, just PRACTICE.
I thought about the fake-number-solution before. Why do we need to use -1? Just use any number not in the array, for example max(array)+1
You should explain your code with a working example
Thank you so so so much <3 <3
What language is he coding in?
I’m studying Python, thank you sir Jer salute🫡
You never dissappoint!
His chair left him to be red coder at the end
this guy learned english, and computer science and how to explain things clearly and put it all on youtube for free so us dumb people can learn, what a legend
And my Amazon phone screen interviewer wanted me to do this in 20 mins.
I have no math background. Can i still do this?
Wow I just watched it on the 1st of April
If someone has filename a.cpp... it means they are ☠️☠️💀
You're an amazing competitive programmer, but probably you should learn the c++ language a bit. For example, it was surprising to me that you didn't know about local variable's lilfetime and that it is an issue to return reference to it as it is already destroyed.
I'm convinced Errichto was sent by God
Great explanation! can you provide more problems to practice after each tutorial please? or in general what should one do after watching a tutorial like this? keep solving on the same topic or just solve problems in general? thanks a lot!
👩🏼❤️💋👨🏼🇮🇳🇮🇳🥥🥥🚠🚠🥇👩🏻❤️👨🏻💝💝🙏🏻🏠🏠👨👩👧👰🏻♀️🏏🏠🏠🏠
👨🏻🎓🥇🥇🗝️🗝️💝👰🏻♀️😄🥥🏠👨👩👧🕊️🥥👰🏻♀️💝🥇🥇🚠
where are you bro i even forget you exist
What if I just want to stuck for Long hours?
what if the question asks the maximum rectangle possible?
Dimension of dp is the number of variables which can completely define a state
dp is used to save time which gets wasted into doing repeated work Generally this happens when one state depends on more than one state
I like solving cs problems but this overwhelmed me
My man didn't even bother running the tests he went right to submit. I will never be that brave
We love Errichto..he is the best!
we can find nth fibonacci same fast than nth prime, but we can get is this prime faster than is this fibonacci LOL
Prefix sum really sizzled my brain two years into leetcoding. Phew!
5:29 yes bcoz you moved and it did something else. now it do same thing. and we not use % we use math,fom() its better
(ans-1+mod)%mod is important instead of simply ans-1 .. I couldn't figure it out myself.. for problem S-Digit Sum
Thanks Errichto! solving first four was really good ;)
how many here have attended interviews at FANG (Facebook,Amazon, Netflix,Google)companies and got DP questions in their processes ?