Skip to content

Latest commit

 

History

17 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

leetcode-solutions

Soluções otimizadas em Python para problemas de algoritmos e estruturas de dados, focadas em Big-O e Live Coding

🎯 LeetCode & Data Structures in Python

Coleção de soluções em Python para desafios de algoritmos e estruturas de dados, organizadas por padrões e acompanhadas por análises de complexidade ($\mathcal{O}$ notation).


📊 Progresso e Soluções

# Problema Padrão / Estrutura Complexidade Tempo Complexidade Espaço Código
217 Contains Duplicate Hash Set / Map $\mathcal{O}(N)$ $\mathcal{O}(N)$ Acessar
242 Valid Anagram Hash Map / Frequency $\mathcal{O}(N)$ $\mathcal{O}(1)$ Acessar
205 Isomorphic Strings Hash Map (Bijection) $\mathcal{O}(N)$ $\mathcal{O}(1)$ Acessar
2325 Decode the Message Hash Map (Mapping) $\mathcal{O}(N)$ $\mathcal{O}(1)$ Acessar
001 Two Sum Hash Map ($\mathcal{O}(1)$ Lookup) $\mathcal{O}(N)$ $\mathcal{O}(N)$ Acessar
387 First Unique Character Hash Map (Two-Pass) $\mathcal{O}(N)$ $\mathcal{O}(1)$ Acessar
349 Intersection of Two Arrays Hash Set / Pointers $\mathcal{O}(N + M)$ $\mathcal{O}(N)$ Acessar
283 Move Zeroes Two Pointers (In-Place) $\mathcal{O}(N)$ $\mathcal{O}(1)$ Acessar
125 Valid Palindrome Two Pointers (Opposite) $\mathcal{O}(N)$ $\mathcal{O}(1)$ Acessar
344 Reverse String Two Pointers (In-Place Swap) $\mathcal{O}(N)$ $\mathcal{O}(1)$ Acessar
020 Valid Parentheses Stack (LIFO) $\mathcal{O}(N)$ $\mathcal{O}(N)$ Acessar
643 Maximum Average Subarray I Fixed Sliding Window $\mathcal{O}(N)$ $\mathcal{O}(1)$ Acessar
209 Minimum Size Subarray Sum Dynamic Sliding Window $\mathcal{O}(N)$ $\mathcal{O}(1)$ Acessar
704 Binary Search Binary Search $\mathcal{O}(\log N)$ $\mathcal{O}(1)$ Acessar
035 Search Insert Position Binary Search $\mathcal{O}(\log N)$ $\mathcal{O}(1)$ Acessar

🧠 Padrões Mapeados

  • Hash Map / Dictionary: Busca instantânea $\mathcal{O}(1)$ e contagem de frequências.
  • Two Pointers: Manipulação de coleções e alteração in-place com memória $\mathcal{O}(1)$.
  • Sliding Window: Redução de sub-arrays/sub-strings de $\mathcal{O}(N^2)$ para $\mathcal{O}(N)$.
  • Binary Search: Busca logarítmica $\mathcal{O}(\log N)$ em listas ordenadas.
  • Stack: Estrutura LIFO para validação de escopos e navegação.

About

Soluções otimizadas em Python para problemas de algoritmos e estruturas de dados, focadas em Big-O e Live Coding

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages