- Can't open checkout select element on mobile
- How to list all network sites on one page
- BuddyPress - Search members by name and also by username
- Display custom image field in user profile
- WP-Buddypress Search Filter
- Woocommerce merging cart and checkout page together
- Modals using loops and ACF
- How to generate a widget form from an array with accordions/groups and save each value to array?
- Disable 'Add New' in custom post that is made from CPT UI
- WP.org site lost all formatting when I attempted to migrate to Bluehost
- How to use OCR from the command line in Linux?
- Linker gcc error “ld: cannot find -lc”
- SCP requires password but if I SSH to the same server it does not
- Determine extra size of hard link tree
- Should I learn to memorize these keys for Vim for moving - h,l,k,j?
- Monit - How to use different configurations for Day and Night time?
- How do I connect to an SSH server with no ciphers in common?
- Recursively find ONLY the latest logs in all sub-folders and save to file
- Uniformity and overview
- Using the Title in Navigation Bar for a page status
Aho-Corasick: Shortest word ending on certain position
I need to create an algorithm which's output is for every position an index of position and shortest word, that ends here.
Now I did it with complexity O(P + S + O), where P is number of patterns, S length of string we search in and O number of occurences. But I need to do it without the number of occurences in the complexity.
I imagine that for every state of the automaton where we would normally report occurence, we jump back using the "dictionary suffix links" (not sure about the term as I am not studying in English) as far as we can. Then the state we end in is a state where we would normally report occurence of a word, which is the shortest. But by jumping as far as I can using every "dictionary suffix link" could end up with the complexity I have mentioned. How to construct direct "dictionary suffix link" to the shortest word during the construction of the automaton using Aho-Corasick?
Edit: Also, how could I easily deduce an algorithm with shortest word but sta