Cerinta completa Implement a simple text editor. The editor initially contains an empty string, . Perform operations of the following types: append – Append string to the end of . delete – Delete the last characters of . print –
Rooted Tree
Cerinta completa You are given a rooted tree with N nodes and the root of the tree, R, is also given. Each node of the tree contains a value, that is initially empty. You have to mantain the tree under
Queue using Two Stacks
Cerinta completa A queue is an abstract data type that maintains the order in which elements were added to it, allowing the oldest elements to be removed from the front and new elements to be added to the rear. This
Insert a node at the head of a linked list
Cerinta completa This challenge is part of a tutorial track by MyCodeSchool and is accompanied by a video lesson. Given a pointer to the head of a linked list, insert a new node before the head. The value in the
Print in Reverse
Cerinta completa This challenge is part of a tutorial track by MyCodeSchool and is accompanied by a video lesson. Given a pointer to the head of a singly-linked list, print each value from the reversed list. If the given list
Get Node Value
Cerinta completa This challenge is part of a tutorial track by MyCodeSchool Given a pointer to the head of a linked list and a specific position, determine the data value at that position. Count backwards from the tail node. The
Pair Sums
Cerinta completa Given an array, we define its value to be the value obtained by following these instructions: Write down all pairs of numbers from this array. Compute the product of each pair. Find the sum of all the products.
Mr. X and His Shots
Cerinta completa A cricket match is going to be held. The field is represented by a 1D plane. A cricketer, Mr. X has favorite shots. Each shot has a particular range. The range of the shot is from i to
Network administration
Cerinta completa Time Limits C:5, Cpp:5, C#:6, Java:8, Php:18, Ruby:20, Python:20, Perl:18, Haskell:10, Scala:14, Javascript:20, Pascal:5 Like every IT company, the Uplink Corporation has its own network. But, unlike the rest of the companies around the world, Uplink’s network is
Game of Two Stacks
Cerinta completa Alexa has two stacks of non-negative integers, stack and stack where index denotes the top of the stack. Alexa challenges Nick to play the following game: In each move, Nick can remove one integer from the top of
