DEV Community

Mukilan Palanichamy
Mukilan Palanichamy

Posted on

My journey in competitive programming

1. Palindrome Partitioning:

Given a string, the task is to partition it into substrings such that every substring is a palindrome. We need to return all possible ways to partition the string.

Key points:

  1. A palindrome is a word that reads the same forward and backward, for example "madam" or "racecar."

  2. The aim is to find all ways to cut the string into palindromic pieces.

  3. Backtracking is mostly utilized to find all possible partitions.

Image description

2. Non-decreasing Subsequences:

Given an array of integers, the task is to find all subsequences of length 2 or more that are in non-decreasing order. Duplicates should be avoided.

Key Points:

  1. A subsequence is a sequence derived from the array by deleting some or no elements without changing the order of the remaining elements.

  2. Non-decreasing means each element in the subsequence is either equal to or greater than the previous element.

  3. The solution must avoid duplicate subsequences.

Image description

Billboard image

The Next Generation Developer Platform

Coherence is the first Platform-as-a-Service you can control. Unlike "black-box" platforms that are opinionated about the infra you can deploy, Coherence is powered by CNC, the open-source IaC framework, which offers limitless customization.

Learn more

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

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay