Recursive Techniques for Generating Subsets and Permutations
Recursion can be categorized into path-aware and path-unaware forms. Most tree-related recursions are path-aware. Fundamentally, recursion implements depth-first search (DFS). To solve problems recursively, treat the recursive function as a black box that handles a subproblem, then reuse it. Beginners often try to fully expand the recursion, wh ...
Posted on Sat, 05 Sep 2026 16:48:55 +0000 by denoteone
Generating Valid IP Addresses and Subsets from Given Inputs
Valid IP Address Generation
Given a string containing only digits, geenrate all possbile valid IP address combinations. A valid IP address consists of four integers between 0-255 separated by dots, with no leading zeros.
class IPGenerator {
vector<string> validIPs;
bool isValidSegment(const string& s, int start, int end) ...
Posted on Tue, 09 Jun 2026 16:46:05 +0000 by Coronet