Novo curso: Como conseguir vagas remotas em empresas que pagam $120k+/ano
NaGringa
CodingStaff+

Unix Cd Command with Symbolic Link Resolution

Simulate the Unix cd command by implementing path resolution for relative paths ('.' and '..'), absolute paths, and symbolic links while detecting potential cycles. Use stack-based directory traversal for path management and depth-first search to handle symbolic link mappings and cycle detection. Handle edge cases including redundant slashes and invalid path references.

Empresas em que apareceu
MetaMetaOpenAIOpenAI
Contextos reais

Onde essa pergunta já apareceu

Use esses exemplos para entender em que contexto ela costuma cair e adaptar sua prática.

Metamidmar. de 2026

I was was asked this. I didn't have enough time to get to the cycle detection part 🥲

OpenAIstaff_plusset. de 2025

Simulate the Unix cd command by implementing path resolution for relative paths (. and ..), absolute paths, and symbolic links while detecting potential cycles. The solution uses stack-based directory traversal for path management and depth-first search to handle symbolic link mappings and cycle detection. Handle edge cases including redundant slashes and invalid path references.

Anexos públicos

Materiais associados

Nenhum anexo público associado a esta pergunta.

Próximo passo

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.