Self-Driving Bus

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

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

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.

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