Checking if the length of linked list is even odd

Even  Odd

Given a linked list now we are to check if the length of the linked list is even odd.

Even OR Odd
Finding length is even or odd

Continue reading Checking if the length of linked list is even odd

Finding the middle point of a linked list



Middle point

Suppose you have a linked list you have to find the middle point of the linked list.

Method 1

Middle1 by technerds

Algorithm

  1. Find the length of the linked list.
  2. Find the middle point.

Continue reading Finding the middle point of a linked list

Basic Definitions Database Systems Tutorial 1 Unit 1

Basic definitions

basic Definitions

  • Database: A collection of related data
  • Data : Known facts that can be recorded and have an implicit meaning, Ex: names, registration  number, age etc..
  • Mini-world: Some part of the real world about which data is stored in a database. Ex: a school’s student information and other functionalities.
  • Database Management System (DBMS): A software package/system to facilitate the creation and maintenance of a computerized database.
  • Database System: The DBMS software together with the data itself. Sometimes, the applications are also included.

Continue reading Basic Definitions Database Systems Tutorial 1 Unit 1

Finding intersection point of two singly linked list

Intersection point

Suppose initially there are two singly linked list which intersect at some point and become a singly linked list. The head pointers of both the list are known but the intersection point is not known.

title

 

Method 1 for finding intersection point

Brute – Force Approach

Continue reading Finding intersection point of two singly linked list

Reversing linked list using recursion – Data structures

Reversing linked list using recursion

Given a linked list say 1->2->3->4->5, you have to make it as 5->4->3->2->1.i.e reversing linked list using recursion.

Title

Algorithm

Follow the following steps :

  • If head is NULL return
  • If current node next is NULL means it is the last node. So, make head point to it.
  • Recursive traverse the list and set

q = p->next
q->next=p
p->next=NULL Continue reading Reversing linked list using recursion – Data structures

Reverse singly linked list using iteration method

Reverse singly linked list using iteration

Given a singly linked list you have to reverse the linked list.Reverse singly linked list.

Title

Continue reading Reverse singly linked list using iteration method

Check if cycle exist. If there is a cycle find start node

Find start node

Suppose you have a linked list. First you have to detect if their is a cycle in the list. If cycle exist find the start node of the cycle. i.e find start node.

Title

Algorithm

The algorithm is an extension of floyd cycle algorithm. Continue reading Check if cycle exist. If there is a cycle find start node

FOR THE NERDS