[LeetCode] 1044. Longest Duplicate Substring |  Rabin-Karp example | Substring matching

[LeetCode] 1044. Longest Duplicate Substring | Rabin-Karp example | Substring matching

Riyafa Abdul Hameed

4 года назад

64 Просмотров

This is the solution for the leetcode problem 1044. Longest Duplicate Substring



The following links are referred to in this video:
- The MIT course Introduction to algorithms: https://ocw.mit.edu/courses/electrical-engineering-and-computer-science/6-006-introduction-to-algorithms-fall-2011/lecture-videos/

- The coursera course: https://www.coursera.org/learn/algorithms-part2
- Complete implementation of Rabin-Karp: https://github.com/kevin-wayne/algs4/blob/master/src/main/java/edu/princeton/cs/algs4/RabinKarp.java

This is inspired by the Cracking the Coding Interview book by Gayle Laakmann McDowell

This is based on chapter 1 Arrays and Strings

Purchase the book here: https://amzn.to/2ze5Vgf



Here we see how we can perform substring search starting from a naive approach to a more efficient approach using the Rabin-Karp algorithm and binary search. Note that this video does not explain the Rabin-Karp algorithm, but describes its use in the problem. This can be taken as an example application of the Rabin-Karp algorithm


Find the code solution here: https://leetcodevideosolutions.blogspot.com/2020/09/leetcode-1044-longest-duplicate.html

Тэги:

#Cracking_the_coding_interview #Coding_interview #Coding_Solution #LeetCode #Algorithms #Binary_Search #Hash_Table #Rabin-Karp #String_Search #Substring_matching #Duplicate_Strings
Ссылки и html тэги не поддерживаются


Комментарии: