дерево

Ukkonen's algorithm. Linearization of a cyclic string

Suppose I built a suffix tree... I need "Linearize a cyclic string, that is, find the lexicographically minimal section of t ... yclic string" Who has any ideas - how to do it (algorithm)? You can also explain - what is the section of the cyclic string

Is the graph a tree [closed]

Closed. It is impossible to give an objective answer to this question . Answers to it are not accepted at the moment. ... } bool IsTree( int arr[SIZE][SIZE] ) { return is_rec(arr,0,0,0); } I think some people will be interested in solving :)

Acceleration of the suffix automaton

There is a suffix automaton. You need to find the longest substring (common). The automaton is implemented based on this arti ... long strings, the speed is still not enough. Maybe someone has worked with a similar structure and knows how to speed it up?

Petri nets - building a reachability tree

How can a function be called in parallel recursively, so that they are processed in parallel? The code does not work correctl ... ectly, I want to create a tree sequentially, and not recursively building a node and go down until the stop condition is met.

Binary tree and red black tree

Someone can explain to me what is the difference between a red-black tree and a binary tree, I see the difference only in the ... the tree when it becomes unbalanced, is it not possible to do the same in a binary tree without marking, I can also rebuild.

Dijkstra's algorithm for finding a path in a tree with loops

Who can tell you how the Dijkstra algorithm should work correctly when traversing a tree with cycles. I.e. there is a tree th ... haps I am asking a very confused question, if that correct. Thank you! z. s. I write the code in java if there are examples.

Optimization of operations for a binary indexed tree (Fenwick tree)

I am doing optimization in one project that is very out of line with the performance requirements. Here, Fenwick trees are wi ... any imperative language. If my reasoning about complexity is wrong, then I would like to know what exactly I am wrong about.

Deramida with turns

The deramide is constructed as a normal binary search tree, but each element is additionally assigned a priority field, accor ... node with zero fields for root, and because of this, an extra element is output during the crawl. Https://ideone.com/1ZDuxS

Implementing a binary tree (C#) without using built-in classes and collections

The method of adding a new node does not work. class BinaryTree { class BinaryNode //узел дерева { ... for the right and left subtree). current.right = new BinaryNode(value); current = current.right; What could be wrong here?

Non-recursive traversal of a binary tree without a stack

You need to build a non-recursive binary tree traversal algorithm that has the following properties: A tree of n nodes is t ... on the topic is the Morris bypass, but this algorithm temporarily converts the tree is a "stitched" tree, so it doesn't fit.

Traversing 2-3 trees.2-3 a tree as a data structure for storing sets

There is such an implementation of 2-3 trees : class Tree { private: Node * root; char name; } class Node { int ... it is the same) . Only now there is a problem with traversing the tree, please help with the description of the algorithm .

Depth and height of the subtree

What is the difference between the depth and height of a subtree? Could you give an example of an algorithm for finding the depth and height of a subtree?

Copy of the tree in C++

A simple and at the same time interesting task appeared in the work. You need to write a function that will copy the tree. C or C++, preferably in C++.

AVL-tree in C++

Could you explain what an aul tree is? What are its advantages over other trees? If possible, give an example of the avl tree code in C++ or in C.