1152. Analyze User Website Visit Pattern - Python LeetCode Solution

preview_player
Показать описание
Today I solve and explain a medium level difficulty leetcode algorithm using Python3 called "1152. Analyze User Website Visit Pattern"

If you found this helpful Like and Subscribe! I solve LeetCode Algorithms (Python/ Java) and SQL Problems daily!

#leetcode #python #python3 #tutorial #coding #programming
Рекомендации по теме
Комментарии
Автор

Much better explanation than the top leetcode ones.

tonyiommisg
Автор

This is very clear now. Keep up the good work to help us get better with LeetCode!

theFifthMountain
Автор

Thank you for the explanation! Starting from line 15, it is possible to take advantage of max() and list comprehension to avoid writing loops:
max_score = max(scores.values())
max_pattern = [pattern for pattern in scores.keys() if scores[pattern] == max_score]
max_pattern.sort()
return max_pattern[0]

YikangLin
Автор

It is still confusing why the set(combinations) has to be done. So the pattern a, b, b is counted only once in this sequence: a, c, b, d, b, e, b, f, b ? Hasn't the user visited the pattern a, b, b three times?

tgiflying
Автор

Excellent explanation! Thank you so much

mahletlulseged
Автор

Hi Carter, thanks for these videos. Could you please make a video about the journey of solving problems, such as the things that you wish to know earlier, also, in which order of topics should I start solving?

pv_
Автор

what tool do you use to write on the screen? I could really use that tool to help me organize my thoughts

viper
Автор

why can't you create combinations of websites without built-in function from itertools. Using for example 3 nested for loops.

GoodLuck-dvzu
Автор

straightforward and helpful thanks !!!

NagaVenkateshgavini
visit shbcf.ru