Problem Statement: Given an array of integers nums[] and an integer target, return indices of the two numbers such that

Continue reading# Category: Data Structure

## Program to generate Pascal’s Triangle

Problem Statement: Given an integer N, return the first N rows of Pascal’s triangle. In Pascal’s triangle, each number is

Continue reading## Add two numbers represented as Linked Lists

Problem Statement: Given the heads of two non-empty linked lists representing two non-negative integers. The digits are stored in reverse

Continue reading## Reverse a Linked List

Problem Statement: Given the head of a singly linked list, write a program to reverse the linked list, and return

Continue reading## Sort an array of 0s, 1s and 2s

Problem Statement: Given an array consisting of only 0s, 1s and 2s. Write a program to in-place sort the array

Continue reading## Find middle element in a Linked List

Problem Statement: Given the head of a singly linked list, return the middle node of the linked list. If there

Continue reading