Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 7 years ago.
Improve this question
I feel confused when learning Red Black Tree,actually I don't know why we need NIL as leaf in the tree and it seems useless.Could any one can help me?Thanks in advance:)
The main reason it has NIL is to always balance the tree, two children per parent for example. If it wasn't properly balanced, in the worst case it would just be a glorified linked list not getting the benefits of a red black tree.
Related
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 2 months ago.
Improve this question
I need to do a job where I need to place a particular object(Hanger) in a standard distance.
The rules are:
We should try to place each object in a given standard distance from each other.
There is a max distance from one object to adjacent object which in no way should be violated.
From the start and end also similar standard and maximum distance rule applies.
And there are some portions given where the objects placement needs to be avoided.
I'm not even able to start... which algorithm to use.
If anyone has any suggestion how I can achieve this or some related source please let me know.
Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 7 months ago.
This post was edited and submitted for review 6 months ago and failed to reopen the post:
Original close reason(s) were not resolved
Improve this question
what would be a better way to find an item in a list rather visiting each node and comparing with the key item.
example:
1->2->3->4->5->6->7->8->9->10->null.
In this list, is there an better way to reach item 6 without visiting each node form zero to 6.
No - with a linked list there is no better option.
There are data structures similar to linked lists which can find the nth item in O(log n), such as skip lists and binary trees. However, in most cases it's a better idea to replace the linked list with a dynamic array.
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 6 years ago.
Improve this question
With Neo4j we can create nodes with shape circle. But how can I create nodes such as Squarer, Cube types?
Thanks!
The Neo4j browser only has a single shape. You'll have to build your own visualization to get anything further.
Possible starting points for building such a visualization include:
d3.js (you already put the tag on the question)
vis.js
Cytoscape
sigma.js
Linkurious
and more
Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 8 years ago.
Improve this question
Why trees are structured downward not as real trees the root is first to the ground?!
It is because you dont know before hand how hight it can grow when writing on paper.
Suppose you are explaining this problem to someone with an array, and you start drawing, you will need to know how much space to leave on a paper before beginning to draw.
This also has the problem in online publishing where user will need to scroll down, a lot, for a really complex tree to get to the root of a tree to understand the tree. Writing the root at the top solves this problem as well.
Maybe i think because human beings start writing on papers and sheets at the top.
Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 9 years ago.
Improve this question
What kind of data structure should be used for nearest neighbor searching in 2d dimension?
I have searched and found out that there are many data structures for this: k-d tree, quadtree, octree.
So what kind of structure should I use?
I suggest a R-Tree, it's designed for that purpose.