Implementation of Deque using Doubly Linked List

Problem Statement The problem “Implementation of Deque using Doubly Linked List” states that you need to implement the following functions of Deque or Doubly Ended Queue using a doubly linked list, insertFront(x) : Add element x at the starting of Deque insertEnd(x) : Add element x at the end of …

Read moreImplementation of Deque using Doubly Linked List

Height of a generic tree from parent array

Problem Statement “Height of a generic tree from parent array” problem states that you are given a tree with n vertices as an array par[0…n-1]. Here every index i in par[] represents a node and the value at i represents the immediate parent of that node. For the root node …

Read moreHeight of a generic tree from parent array

Mobile Numeric Keypad Problem

Problem Statement In the mobile numeric keypad problem, we consider a numeric keypad.  We need to find all number of possible numeric sequences of given length such that you are only allowed to press buttons which are top, down, left, and right of the current button. You are not allowed …

Read moreMobile Numeric Keypad Problem