DEV Community

Mukilan Palanichamy
Mukilan Palanichamy

Posted on

My journey in competitive programming

1. Subsets:

A subset is any group of items that can be selected from a larger set, including the possibility of selecting no items at all.

Example:

Imagine you have a set of 3 numbers: 1, 2, and 3.

Possible subsets:
[{}, {1}, {2}, {3}, {1, 2}, {1, 3}, {2, 3}, {1, 2, 3}]

Image description

2. Combinations:
A combination is a way of selecting items from a group, where the order does not matter.

Example:
The set: 1,2,and 3.

Possible combinations of two numbers:
[{1, 2}, {1, 3}, {2, 3}]

Image description

Top comments (0)

A Workflow Copilot. Tailored to You.

Pieces.app image

Our desktop app, with its intelligent copilot, streamlines coding by generating snippets, extracting code from screenshots, and accelerating problem-solving.

Read the docs

👋 Kindness is contagious

Engage with a sea of insights in this enlightening article, highly esteemed within the encouraging DEV Community. Programmers of every skill level are invited to participate and enrich our shared knowledge.

A simple "thank you" can uplift someone's spirits. Express your appreciation in the comments section!

On DEV, sharing knowledge smooths our journey and strengthens our community bonds. Found this useful? A brief thank you to the author can mean a lot.

Okay