## Detect a Cycle in a Linked List

Examples Example 1: Input Format: LL: 1 2 3 4 5 Result: True Explanation: The last node with the value

## Dynamic Programming: House Robber (DP 6)

Problem Statement: Dynamic Programming: House Robber (DP 6) Problem Statement Link: House Robber A thief needs to rob money in a

## Dynamic Programming: Frog Jump with k Distances (DP 4)

In this article, we will learn about “Dynamic Programming: Frog Jump with k Distances (DP 4)” Problem Statement:  Frog Jump

## Dynamic Programming : Frog Jump (DP 3)

Problem Statement: Given a number of stairs and a frog, the frog wants to climb from the 0th stair to

## Factorial of a Number : Iterative and Recursive

Problem Statement: Given a number X,  print its factorial. To obtain the factorial of a number, it has to be

## Check if a number is prime or not

Problem Statement: Given a number, check whether it is prime or not. A prime number is a natural number that

## Maximum Product Subarray in an Array

Problem Statement: Given an array that contains both negative and positive integers, find the maximum product subarray. Examples Example 1:

## Sum of first N Natural Numbers

Problem statement: Given a number ‘N’, find out the sum of the first N natural numbers. Examples: Example 1: Input: