Vacation and PTO days
Leetcode 568. Maximum Vacation Days
Given a flights graph and a matrix of vacation days per city per week, start at city 0 and choose each week whether to stay or fly along allowed edges to maximize total vacation days over K weeks. The core challenge is a DP/state-search over (city, week) states with transitions constrained by the flight graph and time steps to accumulate the optimal sum.
Onde essa pergunta já apareceu
Use esses exemplos para entender em que contexto ela costuma cair e adaptar sua prática.
# You work in an international company with an odd travel policy. # If you are in country X when there’s a national holiday, # you get that day off for free (doesn’t count against your vacation quota). # Assuming you can only travel on weekends, compute a travel schedule that maximizes your vacation days. # Follow up with least city changes
Materiais associados
Nenhum anexo público associado a esta pergunta.
Depois de treinar essa pergunta, vale abrir outras do mesmo tipo e da mesma senioridade para comparar padrões de resposta.
Isso ajuda a sair da memorização de uma resposta só e entrar em repertório real de entrevista.
Continue a preparação com o banco completo
No app você encontra perguntas parecidas, compara empresas e aprofunda essa busca com mais filtros.