Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CPP

queue

 printElements() {

      let currentNode = this.front;
      let output ='';

      while (currentNode) {
     output = ` ${output}${currentNode.value} ->  ` ;

          currentNode = currentNode.next;
      }
      console.log(`${output}null`);
      return true
  }
}

//if you find this answer is useful ,
//upvote ⇑⇑ , so can the others benefit also . @mohammad alshraideh ( ͡~ ͜ʖ ͡°)
 
PREVIOUS NEXT
Tagged: #queue
ADD COMMENT
Topic
Name
8+4 =