Bölüm 5 · SimülatörTrie, Suffix Array & Suffix Trie Basics? ← Bölüm 5 Trie Suffix Build / Search Prefix Text Build Suffix StructuresSuffix array (click a row)rankSAsuffixLCPTrieend of wordsearch pathReady. KapatTrie, Suffix Array & Suffix Trie BasicsBuild a trie from words, inspect prefix queries, and compare suffix-array ordering with suffix-trie storage.How to useTrie: enter comma-separated words (up to 10 words, 12 letters each) and a prefix, then press Build / Search Prefix. The search path is highlighted; filled nodes mark the end of a word.Suffix: enter a text of up to 16 characters and press Build Suffix Structures. The suffix array is listed on the left and the naive suffix trie is drawn on the right.Click a row of the suffix array to highlight that suffix's path in the suffix trie. Enter in an input field also rebuilds.TrieEach edge stores one character; all words with a common prefix share the same path from the root. A prefix query walks down at most |p| edges, so it takes O(|p|) time regardless of how many words are stored.Suffix array and LCPSuffix arrays keep sorted suffix starting positions. The LCP column gives the length of the longest common prefix of a suffix and the one before it in sorted order. Suffixes are compared character by character (code-point order).Suffix trieThe suffix trie stores every suffix as a path from the root; a naive suffix trie can require O(n²) space. A filled node marks the end of a suffix. Suffix trees compress single-child chains to reach O(n) space.ComplexityStructureBuildSpaceQueryTrieO(total length)O(total length)O(|p|)Suffix array (naive sort)O(n² log n)O(n)O(|p| log n)Suffix trie (naive)O(n²)O(n²)O(|p|)