Close

## Reversing a linked list in groups of given size

Given a single linked list, and an integer k, we need to reverse the linked list in groups of size k. For example consider the following diagram of input and output linked lists for k = 3. There are no tricks involved in the solution for this problem. It is just an implementation challenge where…

## How to check if a given number is Fibonacci number

How to check if the given number is a Fibonacci number? A Fibonacci series starts with 0, 1. Remaining elements are formed by adding previous two numbers. Here are a few Fibonacci numbers 0, 1, 1, 2, 3, 5, 8, 13, 21, 34,… If a number is given, a straight forward way to check if…

## Finding equal sum index

Given an array of numbers, find an index such that the sum of numbers to the left is equal to the sum of elements to it’s right. If there are no elements to the left or right, the sum is considered to be zero.This problem is from Hackerrank. Click here to solve this problem on…

## Number of deletions needed to make anagrams

Given two strings, how do we find the number of characters to be deleted from both the strings in order to make them anagrams. Two words are said to be anagrams if one word can be formed by re-arranging the letters of another word. For example the words “TAN” and “ANT” are anagrams. Given two…