I am getting some random result. I have gone through the flow and did dry run several time but can't figure out exactly what's wrong with the code. flow of prog
I am studying LinkedLists and wanted to check Java's implementation. However, I have some questions. I saw that I can print the contents of java.util.LinkedList
#include<stdio.h> #include<stdlib.h> void insert_front(struct node* head, int block_number); void insert_rear(struct node* head,
I am trying to create a linked list using pydantic. The following code works, but I can't get auto-completion to work. As you can see from the attached screensh
I want to remove the nth node from the end of the list by reversing the linked list first and then removing the nth node. I know there's a better solution than
These are the codes for __iter__ method of a circular singly linked list. But I don't understand the difference between the two. def __iter__(self): node =
These are the codes for __iter__ method of a circular singly linked list. But I don't understand the difference between the two. def __iter__(self): node =
I have a few questions about the code snippet below. It was part of assigment we had. I've already done it but my questions are regarding the provided code we w
I'm trying to create a linked list that has 2 data types and a function that inserts nodes. But in order to insert nodes, I have to create at least 1 empty node
Could someone check my code for why I'm getting NullPointerExceptions in various methods? I've been racking my brain and can't figure out what is wrong. I'm att
When a certain if statement is passed i have to remove the head node from my first linked-list "new_queue" and add this to the back of my second linked-list "re
I have a project that I'm working on for a Systems Programming course. I'm building off of my professor's code. (Please don't mind her lack of labelling, etc. -
In short, I should have " 1 2 3 4 5 6 7 8 9 10 ". When executed in CodeBlocks instead of 0 i am getting random numbers. But When compiling using onli
It's Showing output for 2 nodes but after adding 3rd node it doesn't showing any output, what i'm doing anything wrong?? This is the append method that i have
I am making a snakes and ladders game in C using a LinkedList, I have a square struct that represents squares on the board. I need to add snakes and ladder that
Can someone explain me what are the differences by using E or Object for example in a class for Lists, and their singular usage and definition. I have to use th
I want to pass liked list to function and create new list. I need some help to understand what I'm doing wrong. I create new pointer and copy the pointer to "cu
My create function is not creating a linked list. I can't seem to figure out the problem here. The code runs but I don't get any output. Can anyone figure out w
I have a struct typedef struct hash_entry_{ char *string; void *data; struct hash_entry *next; }hash_entry, *p_entry; I am referencing p_entry later i
I am trying to create a function that adds a node to the beginning of a double-linked list in C++, and I'm getting this error in Xcode. I know it must be becaus