## Detect Cycle in a linked list (Floyd’s Cycle Detection Algorithm)

In this post, we will see how to detect cycle in a a linked list using Hashing and Floyd’s Cycle Detection Algorithm.

## Merge two sorted linked lists from their end

Write a function that takes two lists, each of which is sorted in increasing order, and merges the two together into one list which is in decreasing order and return it. In other words, merge two sorted linked lists from their end.

## Reverse every group of k nodes in given linked list

Given a linked list, reverse every adjacent group of k nodes in it where k is given positive integer.

## Reverse a Linked List in C/C++ using Recursion

In this post, we will see how to reverse linked list using recursion in C and C++.

## Reverse a linked List in C and Java (Iterative Solution)

In this post, we will see how to reverse linked list iteratively without using recursion.

## Intersection of two given sorted linked lists

Given two lists sorted in increasing order, create and return a new list representing the intersection of the two lists. The new list should be made with its own memory — the original lists should not be changed.

## Merge two sorted linked lists into one

Write a function that takes two lists, each of which is sorted in increasing order, and merges the two together into one list which is in increasing order and return it.

## Remove duplicates from a sorted linked list

Given a linked list sorted in increasing order, write a function which removes any duplicate nodes from the list by traversing the list only once.

## Find all N-digit binary strings without any consecutive 1’s

Given a positive integer N, count all N-digit binary strings without any consecutive 1’s.

## Count number of paths in a matrix with given cost to reach destination cell

Given a M x N matrix where each cell have non-negative cost associated with it, count number of paths to reach last cell (M-1, N-1) of the matrix from its first cell (0, 0) such that path has given cost. We can only move one unit right or one unit down from any cell. i.e. …

## Longest Palindromic Subsequence using Dynamic Programming

The Longest Palindromic Subsequence (LPS) problem is the problem of finding the longest subsequences of a string that is also a palindrome.

## Find all lexicographically next permutations of a string sorted in ascending order

Given a string sorted in ascending order, find all lexicographically next permutations of it.