algorithm - Small questions on data structure -


I want to find the parents of a node with Kruskal's algorithm. My program works just fine, but I think I've heard of a method for improving the speed of the algorithm and connecting to the parent node by reconfiguring the paper while searching for the parent node. I am pretty sure that I have heard something about it, perhaps in a lecture. Can someone refresh my memory?

Moreover, while looking at the minimum and maximum value of a certain segment of an array, looking at the many arrays, what is the name of the tree that can be calculated in the O (log n) By creating a binary tree with a minimum / maximum value of each array, the minimum / maximum value from the array?

Regarding your second question: I think you are talking about one. You can get a heap in the minimum or maximum O (1) and delete it in o (log n).

Although there are some sophisticated data structures, which are meant to handle entire lists (i.e. they are not specifically designed for minimum / maximum access). (amortized O (log n)) These minimum at least and help maximize use

    In relation to your first question: one is used to calculate but since you If you mention the "parent node", I think that your considered structure is already a tree but if the structure is already a tree, Cruscle algorithm only returns the tree. Can you possibly understand what it means by "parent node"


Comments

Popular posts from this blog

windows - Heroku throws SQLITE3 Read only exception -

lex - Building a lexical Analyzer in Java -

python - rename keys in a dictionary -