# Category - C++ programming

## C++ Program-K’th smallest element in BST using O(1) Extra Space

K’th smallest element in BST using O(1) Extra Space - Binary Search Tree - Given a Binary Search Tree (BST) and positive integer k, find the k’th smallest.

## Cpp Algorithm – Write a program function to detect loop in a linked list

C++ Algorithm - Write a program function to detect loop in a linked list - Linked List - Given a linked list, check if the the linked list has loop or not.

## Cpp Algorithm – The Stock Span Problem

C++ Algorithm - The Stock Span Problem - Stack - The stock span problem is a financial problem where we have a series of n daily price quotes

## C++ Algorithm – Write a function to reverse a linked list

Cpp Algorithm - Write a function to reverse a linked list - Linked List - Given pointer to the head node of a linked list, the task is to reverse

## C++ Programming – Union and Intersection of two Linked Lists

Given two Linked Lists, create union and intersection lists that contain union and intersection of the elements present in the given lists.

## C++ Programming – Find whether an array is subset of another array

Given two arrays: arr1[0..m-1] and arr2[0..n-1]. Find whether arr2[] is a subset of arr1[] or not. Both the arrays are not in sorted order.

## C++ Programming – Binary Tree in Vertical Order Hashmap based Method

An efficient solution based on hash map is discussed. We need to check the Horizontal Distances from root for all nodes and two nodes have the same.

## C++ Programming – Given a matrix of ‘O’ and ‘X’ and find the largest subsquare surrounded by ‘X’

A Simple Solution is to consider every square submatrix and check whether is has all corner edges filled with ‘X’ and the time complexity of this solution.

## C++ Programming – Flood fill Algorithm

In MS-Paint, when we take the brush to a pixel and click, the color of the region of that pixel is replaced with a new selected color.

## C++ Programming – Given n appointments, find all conflicting appointments

A Simple Solution is to one by one process all appointments from second appointment to last. For every appointment i, check if it conflicts with i-1, i-2, …

X