6 posts about String Algorithms by 1 contributor.
Know String Algorithms? Share what you know with developers who are learning it.
Learn a dynamic-programming approach to maximize a binary string's weight by forming non-overlapping alternating pairs while accounting for toggle costs.
Solve a wildcard palindrome problem by minimizing the total ASCII difference between adjacent characters, including impossibility checks and a Java implementation.
Learn how to solve the Longest Matching Word in Dictionary with Removals problem in Java. This article explains the subsequence concept, character position preprocessing, binary search, greedy matching, complete Java solution, dry run, and time and space complexity.
Learn how to solve the Secret Cipher problem efficiently using the KMP (Knuth-Morris-Pratt) prefix function / LPS array in Java. This article explains how repeated prefixes can be identified and compressed using *, how the algorithm constructs the lexicographically smallest encrypted string, and how to achieve O(n) time complexity for strings up to 105 characters.
Discover the shortest unique prefix for every word in an array using a Trie. Efficiently identify distinct word beginnings with this optimized algorithm.
Master dynamic programming to efficiently count LCS increases. Learn prefix/suffix DP for O(nm) solutions, avoiding brute-force recomputation.
DevSocialUpcoming · 3rd editionAI Agents ConferenceNov 23–27, 2026Live onlineMembers only17days leftRegisterPublish an article in this category and earn +1,000 SHARP when it is approved.
Write an article