Data Structures & AlgorithmsVery hardICPC regional · strings
Problem: What is the purpose of a 'suffix link' in Ukkonen's or Aho-Corasick's construction?
- A. It points to the longest proper suffix that is also a node in the structure
- B. It stores the depth of each node
- C. It links all leaves in order
- D. It marks the end of a word only
Correct answer: A. It points to the longest proper suffix that is also a node in the structure
Suffix links let the construction jump to the next shorter matching suffix without restarting.
More Coding Interview Problems questions
- Problem: Which property does an 'order statistics' tree support in addition to search?
- Problem: What is the time complexity of the 'Mo's algorithm with updates' (time dimension added) in terms of n and q?
- Problem: Which problem asks for the length of the shortest cycle in an undirected unweighted graph?
- Problem: Which theorem guarantees a perfect matching in a bipartite graph when Hall's condition holds for the smaller side?
- Problem: What is the main idea of the 'parallel binary search' technique?
- Problem: Which structure gives fast membership tests of substrings after O(n) construction (for a fixed alphabet)?