2 posts about Java DSA by 1 contributor.
Know Java DSA? Share what you know with developers who are learning it.
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.
DevSocialUpcoming · 3rd editionAI Agents ConferenceNov 23–27, 2026Live onlineMembers only16days leftRegisterPublish an article in this category and earn +1,000 SHARP when it is approved.
Write an article