---
title: "Discussion on \"Day 19 – Recursion, Backtracking, and Math Logic\" | Hashnode"
description: "Discussion on \"Day 19 – Recursion, Backtracking, and Math Logic\". 1. Subset Sum (Leetcode 78: Subsets)\nProblem: Return all possible subsets (the power set) of a given array of distinct integers.\nIntuition: At each index, we have two choices: include or exclude the current element.\nvoid solve(int i, vector<int>& num..."
url: "https://hashnode.com/posts/day-19-recursion-backtracking-and-math-logic/68848b5e0c3ffc1541446b1a"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [Day 19 – Recursion, Backtracking, and Math Logic](https://sids-dsa-journal.hashnode.dev/day-19-recursion-backtracking-and-math-logic?utm_source=hashnode&utm_medium=feed)

1\. Subset Sum (Leetcode 78: Subsets) Problem: Return all possible subsets (the power set) of a given array of distinct integers. Intuition: At each index, we have two choices: include or exclude the current element. void solve(int i, vector<int>& num...

Jul 26, 2025 · 4 min read · sids-dsa-journal.hashnode.dev  
Read the article

-   [#dsa](https://hashnode.com/tag/dsa)
-   [#cpp](https://hashnode.com/tag/cpp)

## Written by

[Siddharth Gandhi](https://hashnode.com/@SidGandhiCodes)

@SidGandhiCodes

  
[View profile](https://hashnode.com/@SidGandhiCodes)

Learning. Building. Blogging. Repeat.

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
