Microsoftinternjan. de 2025
Longest ideal subsequence
Given a string s and integer k, find the longest subsequence where the absolute difference between every two adjacent letters' positions in the alphabet is ≤ k — essentially a variant of longest subsequence solved by dynamic programming over the 26 letters, maintaining for each letter the best length of an ideal subsequence ending there and updating from letters within ±k.
Use esses exemplos para entender em que contexto ela costuma cair e adaptar sua prática.
Longest ideal subsequence
Nenhum anexo público associado a esta pergunta.
No app você encontra perguntas parecidas, compara empresas e aprofunda essa busca com mais filtros.