C Program to Merge Two Sorted Linked List (Non Recursive Approach)

In this approach, we will create a merge_sorted() function that takes two lists, each of which is sorted in increasing order, and merges the two together into one list which is in increasing order. The new list should be made by splicing together the nodes of the first two lists.

C++ Program to Implement a Queue using Linked List and Classes

In computer science, a queue is a particular kind of abstract data type or collection in which the entities in the collection are kept in order and the principal (or only) operations on the collection are the addition of entities to the rear terminal position, known as enqueue, and removal of entities from the front terminal position, known as dequeue.

C Program For Finding The Longest Common Subsequence of String

The study of character of strings algorithms has a vital role in algorithm design technique. Here are presenting one of the common methods which tests the matching or similarity between the two strings. The method computes the longest common subsequence from the given text.

C++ Program To Check if a Linked List is Palindrome or not by using Array

Linked list is a linear collection of data elements, called nodes, each pointing to the next node by means of a pointer. It is a data structure consisting of a group of nodes which together represent a sequence. C++ program is given below to check if a Linked List is palindrome or not.

Implementation of Queue Operations in C program

Queue is an abstract data structure, somewhat similar to Stacks. Unlike stacks, a queue is open at both its ends. One end is always used to insert data (enqueue) and the other is used to remove data (dequeue). Queue follows First-In-First-Out methodology, i.e., the data item stored first will be accessed first.

C Program To Create a Singly Linked List


#include <stdio.h>
#include <stdlib.h>
struct node{

    int data;

    struct node *next;

}*root=NULL,*newnode;

void insert(int item);
void print();
int main()
{

       int ch,item;
       do
      {

              printf("\nEnter the element to be insert in the linked list: ");

              scanf("%d",&item);

              insert(item);