16,774 questions
- Bountied 0
- Unanswered
- Frequent
- Score
- Trending
- Week
- Month
- Unanswered (my tags)
-6
votes
0
answers
70
views
Type mismatch in connection tree
I build connections with function neurons but I meet a type mismatch that I don't understand. The problem happens in recursion, so it is not easy. The functions applyInputs and output have a similar ...
0
votes
4
answers
166
views
heap-use-after-free when incorrectly assigning pointers during binary tree inversion [closed]
I was attempting the binary tree inversion question on Leetcode
https://leetcode.com/problems/invert-binary-tree/
I came up with this solution
TreeNode* invertTree(TreeNode* root) {
if (root ==...
0
votes
0
answers
66
views
How do I properly insert 3 into my nested list tree?
I am working on a program that is supposed to build a tree using nested lists in Racket. I believe I am very close, but I am stuck on one section of my insertion testing process.
The syntax for my ...
0
votes
1
answer
98
views
How do I rewrite paths in an AST's import tree?
I'm writing a program that will update a Rust project's imports to be from their new locations after a breaking change in a library. In this instance, I'd like to flatten all imports from vexide::...
6
votes
3
answers
404
views
Find any single 2D point within radius, but fast
I've got a list P of 2-dimensional points, 100 ≤ |P| ≤ 100000, and a list C of circle centers, 100 ≤ |C| ≤ 100000.
All coordinates (x,y) ∈ P or (x,y) ∈ C are integral, 0 ≤ x,y ≤ 4095.
P and C may ...
0
votes
0
answers
73
views
Create custom Pivot table with tree structure
I created a pivot table like the one in the image.
The data part was done this way
The pivot representation works for me because for each product, line, or family (iPad->iPad Air->iPad Model), ...
2
votes
1
answer
119
views
Display game variation tree using compact vertical layout
I want to create a multi-line string that can be printed out or displayed via curses. This string displays the moves and variations of a go/weiqi/baduk game from an sgf file using unicode characters. ...
0
votes
1
answer
68
views
How can I compare a tree with different node types to a list of courses to see which courses have been completed and which haven't?
I'm working on a transcript analyzer personal project and I'm having an issue comparing the courses that are read in from the transcript with the required corses. The required courses are stored in a ...
-2
votes
1
answer
86
views
Treelib does not show hierarchical tree node data [closed]
Using tree package treelib in Python I define a small tree that is slightly modified from the description for command show:
from treelib import Tree
tree = Tree()
tree.create_node("Root", &...
0
votes
0
answers
49
views
Tree (closure table) does not save children relations to _closure table
I have the following entity:
@Tree('closure-table')
@Entity()
@Unique(['target', 'slug'])
export class SupportNodeEntity extends TreeNodeEntity {
@Column({ type: 'enum', enum: SupportNodeVisibility, ...
0
votes
4
answers
601
views
Answer sum of values on tree path, with updates, efficiently
You are given an unweighted tree with N nodes and each node starts with value 0. There will be Q queries. The 1st type of query will change the value at a node to a new value. The 2nd type of query ...
1
vote
1
answer
176
views
LeetCode 199. Binary Tree Right Side View constant memory complexity
I'm trying to solve LeetCode 199.
Given the root of a binary tree, imagine yourself standing on the right side of it, return the values of the nodes you can see ordered from top to bottom.
I've ...
2
votes
1
answer
162
views
How to ensure correct destructing of a non-regular tree?
I need a function that parses a string to create a non-regular tree and returns a pointer to its root. In the case of a parsing error, an exception is thrown. My current attempt leaks memory.
How to ...
1
vote
0
answers
61
views
Ant Design Tree keeps scrolling with the mouse pointer even after releasing the mouse (during DnD), and also when the pointer is outside the tree
Description:
I'm using the Ant Design Tree component with drag-and-drop enabled. During drag, the tree auto-scrolls based on the mouse position — which is expected. However, it keeps scrolling even ...
2
votes
2
answers
154
views
How to make a tree support dark/light mode?
All the pages I have been able to add support for dark/light mode. One page has a tree and everything I tried failed and most changes made the formatting (text, alignment, etc.) change, for the worse. ...