Cerinta completa Treeland is a country with cities and roads. There is exactly one path between any two cities. The ruler of Treeland wants to implement a self-driving bus system and asks tree-loving Alex to plan the bus routes. Alex
Self Balancing Tree
Cerinta completa An AVL tree (Georgy Adelson-Velsky and Landis’ tree, named after the inventors) is a self-balancing binary search tree. In an AVL tree, the heights of the two child subtrees of any node differ by at most one; if
Reverse a linked list
Cerinta completa This challenge is part of a tutorial track by MyCodeSchool and is accompanied by a video lesson. Given the pointer to the head node of a linked list, change the next pointers of the nodes so that their
Tree: Huffman Decoding
Cerinta completa Huffman coding assigns variable length codewords to fixed length input characters based on their frequencies. More frequent characters are assigned shorter codewords and less frequent characters are assigned longer codewords. All edges along the path to a character
Reverse a doubly linked list
Cerinta completa This challenge is part of a tutorial track by MyCodeSchool Given the pointer to the head node of a doubly linked list, reverse the order of the nodes in place. That is, change the next and prev pointers
Ticket to Ride
Cerinta completa Simon received the board game Ticket to Ride as a birthday present. After playing it with his friends, he decides to come up with a strategy for the game. There are cities on the map and road plans.
Polynomial Division
Cerinta completa Consider a sequence, , and a polynomial of degree defined as . You must perform queries on the sequence, where each query is one of the following two types: 1 i x: Replace with . 2 l r:
QHEAP1
Cerinta completa This question is designed to help you get a better understanding of basic heap operations. There are types of query: “ ” – Add an element to the heap. “ ” – Delete the element from the heap.
Poisonous Plants
Cerinta completa There are a number of plants in a garden. Each of the plants has been treated with some amount of pesticide. After each day, if any plant has more pesticide than the plant on its left, being weaker
Swaps and Sum
Cerinta completa You are given a sequence . The task is to perform the following queries on it: Type 1. Given two integers and . Reorder the elements of the sequence in such a way (changed part of the sequence
