Back to Browse

CSES-Word Combinations

846 views
Feb 22, 2023
42:27

In this video, I shall be solving the first problem of the CSES string Algorithm set i.e. "Word Combinations". Code implementation in C++: https://github.com/ramandeep8421/Algorithms/blob/CSES-String-Algorithms/wordCombinations.cpp Code implementation in Java: https://github.com/ramandeep8421/Algorithms/blob/CSES-String-Algorithms/wordCombinations.java Code implementation in Python: https://github.com/ramandeep8421/Algorithms/blob/CSES-String-Algorithms/wordCombinations.py Video Chapters: 0:00 Introduction 0:20 Problem statement 2:53 Intution/Logic 6:22 Building recursive solution 13:09 Time & space complexity of recursive solution 18:52 Memoization of the recursive solution 24:09 Trie introduction 27:09 Insert operation in Trie 30:10 Search operation in Trie 32:36 Optimal solution using Trie 38:07 Time & space complexity of the optimal solution Resource to learn Rolling Hash: https://cp-algorithms.com/string/string-hashing.html Stay tuned for more such videos :D

Download

0 formats

No download links available.

CSES-Word Combinations | NatokHD