Skip to main content
Filter by
Sorted by
Tagged with
0 votes
2 answers
93 views

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():...
shrykullgod's user avatar
0 votes
1 answer
61 views

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 ...
Sumit's user avatar
  • 37
3 votes
3 answers
111 views

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....
lc_vorenus's user avatar
0 votes
0 answers
41 views

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 ...
mohsen's user avatar
  • 31
1 vote
1 answer
248 views

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 ...
Alejandro Diaz's user avatar
0 votes
1 answer
24 views

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 ...
Phrogz's user avatar
  • 304k
2 votes
1 answer
265 views

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 ...
Infinite's user avatar
  • 131
0 votes
1 answer
123 views

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 ...
Cristii's user avatar
  • 13
0 votes
1 answer
79 views

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 ...
jabronski's user avatar
0 votes
1 answer
120 views

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 ...
Apoorva Walia's user avatar
1 vote
2 answers
78 views

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 "...
Yura's user avatar
  • 75
1 vote
2 answers
134 views

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. ...
Ashini Ayodhya's user avatar
0 votes
1 answer
54 views

I have a list of dictionarys named "sections" in this format: [{ "elements": [ "/sections/1", "/sections/5", "/sections/6&...
Shubham R's user avatar
  • 7,676
1 vote
0 answers
196 views

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 ...
Yung-Wen Lan's user avatar
1 vote
1 answer
47 views

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 ...
smpa01's user avatar
  • 4,401
2 votes
1 answer
58 views

My question is with traversing. In my problem the sequence of the traversal is not following as it should. I am using the general logic for the inorder, preorderand the postorder traversal but it is ...
mehrab.4's user avatar
0 votes
1 answer
86 views

This is my attempt for coding-ninja question top view of binary tree https://www.naukri.com/code360/problems/top-view-of-binary-tree_799401?leftPanelTabValue=PROBLEM I wish to do it with TreeMap only. ...
Garvit's user avatar
  • 1
0 votes
1 answer
112 views

I'm going to parse a nested xml file using PowerShell. Is there a way to traverse its childnodes and the nodes of its child one by one? For example: <?xml version="1.0"?> <root ...
Laowantong's user avatar
0 votes
1 answer
104 views

Let's edit a text block in Figma as shown in the image: Figma Plugin API gives the following segments for this text block: const segments = [ { "characters": "Lorem ", "...
Cihad Paksoy's user avatar
0 votes
1 answer
152 views

I am working on a class named Boggle which contains two class-side methods below: search: board for: words | result visited trie | result := Dictionary new. trie := CTTrie new. words do: [:...
Aliplayer1's user avatar
2 votes
1 answer
149 views

I have a group of nodes and edges connecting these nodes, each edge has a cost to traverse. All of these nodes are put into their subsets and a cycle must be found for the lowest cost to visit at ...
Noah Glimcher's user avatar
2 votes
4 answers
167 views

I am using SBCL and I don't mind a compiler-specific solution. I have form that involves some structs and I would like to walk and modify some sub-forms but subst can't see behind structs: CL-USER> ...
fakedrake's user avatar
  • 6,936
0 votes
1 answer
485 views

Here's my code to set up tree nodes. class TreeNode { constructor(value, left, right, level) { this.value = value; this.left = left; this.right = right; this.level = level } } ...
Boo Shorty's user avatar
1 vote
3 answers
131 views

I created Binary Tree with some nodes and trying to get the result of inorder traversal using dictionary, but It does not really work. Why the list does not append, even tho it prints the result? ...
Nei's user avatar
  • 11
0 votes
1 answer
89 views

I'm using bfs and iddfs to find the optimal solution of the 8 tile puzzle, however, my IDDFS is missing solutions and i'm not sure why. ive checked and it seems that every node visits all it's sons, ...
Ofekino97's user avatar
0 votes
1 answer
75 views

So I am having trouble how I would convert a nodeTraversal into Hashset. GraphTraversal<vertex, vertex>nodeTraversal = this.central.V().has(nodeid).in("node").values(nodeId); So far I ...
e_wards's user avatar
  • 55
0 votes
1 answer
34 views

I need to track a fixed number of items with a variable number of value pairs for each in PHP (7.x or 8.x). Meaning item 1 may have 1 value pair (e.g. "red",32) whereas another item may have ...
Kazz's user avatar
  • 37
-1 votes
1 answer
42 views

I'm puzzled why thew second traversal with .closest seems to fail in this simple example: function testClosest(element) { let firstParentDiv = element.closest('div'); ...
user44109's user avatar
  • 129
-1 votes
1 answer
398 views

I have the following sequences: Inorder: {4, 2, 5, 1, 6, 3} Preorder: {1, 2, 4, 5, 3, 6} I'd like to understand how to construct a binary tree from these sequences and why it's possible with this ...
kikall's user avatar
  • 1
0 votes
0 answers
115 views

I am trying to do a Dfs on a weighted grid to find both the shortest distance and longest distance to reach from the index 0,0 to the end cell in the bottom right corner. I know this can be achieved ...
Vikneshwaran Seetharaman's user avatar
0 votes
1 answer
20 views

As the volume of PieCloudDB Database grows, and if there are an increasing number of tables, both wide and small, along with numerous chunk objects stored in S3, how can we improve the efficiency of ...
Meliodas Dragon's user avatar
-1 votes
1 answer
139 views

There are N bidirectionally connected nodes (Pn), each node represents a value, and there is an attenuation value (0 - 1) between the nodes. Now I want to calculate the maximum value from each node to ...
noodle_run's user avatar
0 votes
1 answer
247 views

I am new to kdb/Q. I've used Python in the past, and am trying to find out how I can traverse a kdb table using the equivalent of a for loop. I have a table called SymbolList that looks like this: ...
mmv456's user avatar
  • 33
0 votes
0 answers
28 views

void dfs(int row,int col,vector<vector<int>>& vis,vector<vector<char>>& mat,int delrow[],int delcol[]){ // giving segmentation fault // vis[row][col] = 1; ...
Arka Mukherjee's user avatar
0 votes
1 answer
385 views

I am trying to have 2 points visit all points in a 3 x 3 grid. The method of visiting the points is: I have points P1 and P2, starting from (0, 0). P1 moves from (0, 0) to (0, 1), (1, 0) until (3, 3)....
Ken Adams's user avatar
0 votes
1 answer
55 views

int * decrementArrayElements(int numbers[], int size){ for (int &x: numbers) { x = x-1; } return numbers ; } well as mentioned am trying to dec val of each array ele by 1 ...
Abhinav's user avatar
  • 19
0 votes
2 answers
139 views

I'm trying to understand how this code works: # Definition for a binary tree node. # class TreeNode: # def __init__(self, val=0, left=None, right=None): # self.val = val # self....
user1190361's user avatar
0 votes
1 answer
166 views

Given an array representing the level-order traversal of a binary tree (not BST), reconstruct the tree. Example: Input: [6,x,8,4,x] output: 6 \ 8 / 4 x in the ...
Nathan 's user avatar
  • 380
0 votes
1 answer
57 views

I have the two functions below "PRE_ORDER_TRAVERSAL" def pre_order_traversal(root: Node): if root is not None: print(root.val) pre_order_traversal(root.left) ...
0004's user avatar
  • 1,270
-3 votes
2 answers
125 views

Consider: class Node: def __init__(self,data): self.data=data self.ref=ref class LinkedList: def __init__(self): self.head= None def print_LL(self): if self.head==...
 PROTTASHA's user avatar
-1 votes
2 answers
85 views

I wrote my own function to display array structure in a comfortable way. It shows array like that: $data: $data[id] = 3 $config: $config[last_offer_day] = 01.07.2023 and etc. I think my code is too ...
Eugene's user avatar
  • 47
1 vote
0 answers
134 views

Context and description of the encountered problem Currently I'm learning the Rust Programming Language and last weekend I found myself implementing a generic n-Ary weighted tree data structure whose ...
JosRs's user avatar
  • 11
0 votes
2 answers
98 views

In java I have a list where each element consist of a leftName and rightName. If the left or rightName is null it indicates that it has an another leaf/node (if both of them are null they have 2 ...
Balázs Patai's user avatar
3 votes
2 answers
267 views

The traverse lens (is it a lens?) allows looking at Map key value in a value-by-value basis. For example: import Data.Map import Control.Lens simpleMap :: Map Int Char simpleMap = fromList [(1, 'a'), ...
Agnishom Chattopadhyay's user avatar
0 votes
0 answers
82 views

Problem Why is an empty JanusGraph not able to read messages for timestamp? What message is JanusGraph referring for janusGraphManagement.getOrCreatePropertyKey()? How is this warning fixed and why ...
Zach's user avatar
  • 765
1 vote
1 answer
65 views

I am looking for the best data structure to store two hierarchical trees, where my aim is to find whether all the possible connections between these two trees are covered. I will describe my problem ...
Pranav Rai's user avatar
0 votes
2 answers
133 views

I was looking for a simple bash one-liner for traversing a file system and printing all the files in pre-order arrangement. It seems as though find is not capable of doing this. I could try to sort ...
Trevor Hickey's user avatar
4 votes
2 answers
253 views

I am trying to map a sanity schema, but I am unable to do so, please help me if any knows: This is the sanity schema categories.js which I want to traverse, here I want to traverse the features array ...
Yashwant's user avatar
0 votes
2 answers
649 views

I'm looking for a convenient option to get the last element from a container/range which only supports forward traversal, which essentially means I cannot do stuff like std::prev(std::end()). For now ...
Kaiyakha's user avatar
  • 2,075
0 votes
1 answer
32 views

This is the code of my program, it is an AVL Tree but it shows error error: cannot find symbol This error message is indicating that the compiler cannot find the symbol rotateWithRightChild. This ...
ouie raphael's user avatar

1
2 3 4 5
41