Loading
2 posts about Combinatorics by 1 contributor.
Know Combinatorics? Share what you know with developers who are learning it.
Learn how to count array subsets whose MEX falls within a given range using frequencies, powers of two, and modular arithmetic in Java.
Learn how to count palindromic strings of length up to n using the first k lowercase English letters, where no character appears more than twice. This article explains the key palindrome observations, separates even and odd-length cases, derives the permutation formulas, and provides an efficient Java solution using modular arithmetic. The solution achieves O(k) time complexity and O(1) auxiliary space.
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