2,015 questions
0
votes
2
answers
93
views
python basics: can someone help me understand processing one file vs processing all files at a time?
This will output all csv files from the directory, but only show one of the csv dataframes.
OUTPUT_PATH = "./static/output/"
FILE_LIST = glob.glob("./static/*.json")
def all_data():...
0
votes
1
answer
62
views
Focus traversal on TextField not working as expected in Flutter
Below code generates UI as follows, here which ever container is selected it gets highlighted with border and its descendants are traversable on tapping tab, other container's children does not get ...
3
votes
3
answers
113
views
Iterative graph traversal: non-BFS and non-DFS ordering
Consider this traversal algorithm in pseudocode:
Traverse(G, v):
S is stack
stack.push(v)
label v as visited
while S is not empty:
v = S.pop()
for all w in G....
0
votes
0
answers
41
views
flutter webOS navigate with arrow key between widgets
I want to make webOS app with Flutter and use this app in TV, I have a List of items, consider 3 rows which are having 10 items each, and all scrollable, I want to move between them by keyboard and ...
1
vote
1
answer
249
views
TypeError: Cannot read properties of undefined (reading 'traverse') in VTK.js when trying to render an image in React
I'm working on a project using React and VTK.js, and I'm encountering an error when trying to render a medical image using vtkRenderWindow and vtkRenderer. The error I am getting is:
TypeError: Cannot ...
0
votes
1
answer
24
views
Select elements between two elements in HTML, at different levels
Alternative headline: traverse all nodes in a tree between two nodes.
I have a DOM tree (an ordered tree, where child elements at each level have a specific order). I am given start and stop nodes in ...
2
votes
1
answer
269
views
Why are back edges and forward edges said to be impossible in BFS for an undirected graph?
Is it true that there are no back edges and no forward edges in a BFS of an undirected graph?
I feel this is incorrect. Here is my counterexample (graph is represent using adjacency list):
0 : 1
...
0
votes
1
answer
123
views
Can't figure out a water-flowing algorithm
Context:
I have a matrix of x and y dimensions.
The left-most column and the top-most row are considered the edges of the North-West ocean.
The right-most column and the bottom-most row are ...
0
votes
1
answer
79
views
How can I do a post-order traversal of a tree, when the only function I have is getChildren()?
I'm trying to collect all nodes in specific post-order traversal order. However, I'm not quite sure how to do this when my only function is getChildren(), rather than a left or right child. Here is ...
0
votes
1
answer
120
views
Why am I getting "time limit exceeded" error in binary tree level order traversal problem in leetcode?
I'm trying to solve the problem: Binary tree level order traversal problem on LeetCode and I've also tried looking for the answers, but I'm still getting a time limit exceeded (TLE) error. Please help ...
1
vote
2
answers
78
views
Graph traversal algorithm: when it is possible to move to the next node only after having visited it earlier with all incoming edges of the graph
There is a graph that consists of vertices (industrial installations) and edges flows of raw materials, intermediates and products between this nodes.
I need some kind of algorithm for "...
1
vote
2
answers
134
views
How can I efficiently find the k-th node from the end and m-th node from the beginning of a singly linked list in one pass?
I'm working with a singly linked list in Java and need to implement a method that can simultaneously find the k-th node from the end and m-th node from the beginning of the list in a single traversal. ...
0
votes
1
answer
54
views
Traverse elements of nested sections list python
I have a list of dictionarys named "sections" in this format:
[{
"elements": [
"/sections/1",
"/sections/5",
"/sections/6&...
1
vote
0
answers
196
views
BigQuery SQL query for traversing an undirected cyclic graph and returning all vertices found
I have an edges table in my Bigquery database that represents the edges of a directed cyclic graph, with two columns: (node_from, node_to).
Given a set of initial nodes (initial_node), I'd like to be ...
1
vote
1
answer
47
views
Traversal with conditions
I am working with a hierarchical dataset traversing through all levels of children and transforming them based on some conditions. Once, I am done with the transformation, I need to store the ...