• Courses
  • Tutorials
  • DSA
  • Data Science
  • Web Tech
October 21, 2024 |100 Views

PROBLEM OF THE DAY : 14/10/2024 | Count Linked List Nodes

Description
Discussion

Welcome to the daily solving of our PROBLEM OF THE DAY with Jay Dalsaniya We will discuss the entire problem step-by-step and work towards developing an optimized solution. This will not only help you brush up on your concepts of Linked List but also build up problem-solving skills.

Given a singly linked list. The task is to find the length of the linked list, where length is defined as the number of nodes in the linked list.

Examples :

Input: LinkedList : 1->2->3->4->5

Output: 5 Explanation: Count of nodes in the linked list is 5, which is its length.

Give the problem a try before going through the video. All the best!!!
Problem Link: https://practice.geeksforgeeks.org/problems/count-nodes-of-linked-list/1