Swap Nodes [Algo]

Cerinta completa A binary tree is a tree which is characterized by one of the following properties: It can be empty (null). It contains a root node only. It contains a root node with a left subtree, a right subtree,

Simple Text Editor

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

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.