Questions tagged [nodes]

Nodes are the basic units used to build data structures such as linked lists and trees.

A node is a record consisting of one or more fields that are links to other nodes, and a data field. The link and data fields are often implemented by pointers or references although it is also quite common for the data to be embedded directly in the node.

Nodes are used to build linked data structures such as , , and . Large and complex data structures can be formed from groups of interlinked nodes. Nodes are conceptually similar to vertices, which are elements of a graph. Software is said to have a node graph architecture when its organization consists of interlinked nodes.

http://en.wikipedia.org/wiki/Node_(computer_science)

6243 questions
1
vote
1 answer

Sorting linked list in ascending order

I am having trouble sorting a linked list based on their ratings. I am given three tasks, if the list is empty I add the first node, if the passed in node's rating is less than the first node, I move it to the front. If it is greater than the last…
Mike Rawding
  • 121
  • 4
1
vote
1 answer

how pointer works in singly linked list?

i have this code for singly linked list and it works. I understand theoretically the principle of singly linked list, but when it comes to code I dont understand how the pointer works. my problem is in this two lines code which is part of the code…
1
vote
1 answer

Binary Search Tree not deleting Node

I have created a Binary Search Tree and am trying to delete specific nodes after adding them. I can successfully delete about 5 Nodes but when I try to delete a Node with id 109 it just ignores it and nothing happens. I have tried many methods to…
Richard
  • 1,087
  • 18
  • 52
1
vote
1 answer

DoubleNode ADT - Printing node for node

First: This is a Homework assignment! I don't really want someone to code this for me but I need help locating where I messed this up. Second: The Issue: We are working with ADTs and creating currently a DoubleLinkedNode ADT (holds specifically…
1
vote
1 answer

ndtv and r shiny: labels for nodes do not show up

I have created this application: https://usaskssrl.shinyapps.io/AnnualReport_2017_18/ I am trying to make a network dynamic visualization in R shiny (tab: Network Analysis, this takes a few minutes to load). Everything looks like it works fine but…
Ahmad Mobin
  • 153
  • 10
1
vote
1 answer

How to set node names in networkxgraph from 0 to len(G.nodes)

Hope you can help me with the following, proably very simple but I just can't seem to get it. I want to set nodesnames to my nodes in my graph, so I can use them later for dijkstra's algorithm from the networkx package. The shapefile has nodes based…
Jeroen123
  • 55
  • 8
1
vote
1 answer

Create Singly Linked List Menu System using Arrays

I am trying to make a Singly Linked List menu system using an array size of 5, in which it lets the user insert the elements. I have created a solution using Nodes, and an ArrayList, but I am having trouble creating the same solution using an…
j.doe
  • 11
  • 2
1
vote
1 answer

Find duplicate values in XML and remove the node in XSL

I am having issue to find out duplicate value of element and remove the node. XML: Learn XSLT 1 Learn Java 3 Learn…
Ironman
  • 556
  • 3
  • 7
  • 21
1
vote
1 answer

Efficient pagination in Cosmos DB

I need to implement efficient pagination for Cosmos DB with nodejs api. There are many examples about the implementation with .NET and LINQ but I could not find anything good for nodejs. The idea is to send the pageSize and pageIndex and get the…
Mori
  • 2,484
  • 5
  • 28
  • 45
1
vote
0 answers

Mapping/Joining Not Working - Mongoosastic/Mongoose

Enviroment mongoosastic version: 4.4.1 node version: 7.10.1 mongoose version: 4.11.7 elasticsearch version: 6.4.0 Expectation: Post Model: { usernames : ["5ae2cf1dd18f412bcf522750", "5abc7852f28e0b50530af785", "5b582c6b9751c9672f77324d"]…
Web Development
  • 149
  • 1
  • 1
  • 6
1
vote
4 answers

Segmentation faults for allocating memory for a binary search tree in C

I am trying to implement a binary search tree in C and am getting a segmentation fault when trying to run my code. Essentially in my code I am reading in a line of data from a file, creating a node for it and then inserting that into my binary…
TheAddie
  • 73
  • 1
  • 6
1
vote
1 answer

duplicating nodes of a single list in c

i have a single list non-circular without sentinel and i want to duplicate every node of it. For example, i have 7,5,12,16 and i want to have : 7,7,5,5,12,12,16,16 but i can't create it.Below is my function code for duplicate the nodes(other parts…
1
vote
1 answer

setState not working inside axios fetch

class ItemsPage extends React.Component { constructor(props) { super(props) this.state = {items: null } this.fetchImages = this.fetchImages.bind(this) } fetchImages() { var self = this …
1
vote
0 answers

Cannot set property 'addUser' of undefined

I have an error running my node js program. This is the error log TypeError: Cannot set property 'addUser' of undefined at Object. (C:\Users\Noman.Matin\Desktop\mbk\angularProj3MeanAuth\models\user.js:39:26) at Module._compile…
bill
  • 118
  • 5
1
vote
2 answers

Python: specify same generic argument type

I am starting to learn Python from Java. I would like to write Python code similar to this line in Java: public BinaryNode(T nodeData, BinaryNode leftChild, BinaryNode rightChild) {} Here is what I have tried so far: from typing import…
Hossmeister
  • 166
  • 1
  • 9
1 2 3
99
100