Posts

Showing posts from March, 2020

Representation of polynomials using Generalized Linked List

Image
Hello and welcome. In this week's blog, we will look at a specific application of linked lists. We have dealt with polynomials since high school and now we will write a program to add two polynomials. We will be using a linked list to store the polynomials. Let's start by understanding what is a linked list? What is a Linked List? A linked list is a linear data structure, in which the elements are not stored at contiguous memory locations. The elements in a linked list are linked using pointers as shown in the below image: Image Credits - GeeksforGeeks Linked List is a sequence of links that contains items.  Each link contains a connection to another link.  Linked list is the second most-used data structure after array. There are various types of Linked Lists. Most commonly used are singly linked lists, doubly linked lists, and circularly linked lists. Each type has its own applications. So, what is a Generalized Linked List? A Generalized Linke...