Skip to main content

DS LAB FOR II YEAR


1.SINGLE LINKED LIST

Procedure for creation of single linked list:

STEP-1 :Declaring a variable named as “item”.Ie the element
what we place in the linkedlist of the new node.       
STEP-2 :Read the value  in “item”.
Set first=last=null and next=null.
STEP-3:Create a new node named as temp and assign the
variable item to data part andassign Address of the
node temp to null.
      temp.data=item;
      temp.next=null;
STEP-4:Check  the address part of the first node
Check if first=null
Then assign first=last=temp
Other wise
Then assign the new node tolast.next=temp
         last=temp
STEP-6: Repeat STEP-3 until you read required nodes.

Procedure for display the linked list:

STEP-1 :Check whether the list having nodes or not i.e
Check if first=null
                    Then Print “list is Empty”
Other wise
                     Then Go to STEP-2
STEP-2 :Assign the node temp to first
temp=first
STEP-3 :Repeat STEP-3 until temp not equal to null
(temp!=null)
STEP-4 :Print temp.data and assign temp=temp.next





Procedure for inserting a node at beginning:

STEP-1 :Check whether the list having nodes or not i.e
Check if first=null
       Then print it is not possible to insert node. Since
the first node itself containing anull address
value that indicates the linked list does not
have any node.
Other wise
Then Go to STEP- 2.

STEP-2 :We create a new node named as temp. we insert the new
         node temp at the beginning of the list the address of
the first node is placed into the new node temp.
temp.data = item
temp.next = first
first=temp 

Procedure for inserting a node at last:

STEP-1 :Check whether the list having nodes or not i.e
Check if first=null
       Then print it is not possible to insert node. Since
the first node itself containing anull address
value that indicates the linked list does not
            have any node.
Other wise
Then Go to STEP- 2.

STEP-2 :We create a new node named as temp. we insert the new
         node temp at the last of the list the address of the
temp node is placed into the last node.
temp.data = item
temp.next = null
last.next = temp
                last=temp 


Procedure for inserting  a node at middle and end of the linked list:

STEP-1 :Check whether the list having nodes or not i.e
Check if first=null
       Then print it is not possible to insert node. Since
the first node itself containing anull address
            Value that indicates the linked list does not
have any node.
Other wise
Then Go to STEP- 2.
STEP-2 :We create a new node named as temp. we insert the new
         node temp at the middle of the list.
STEP-3 :Finding the length of the current list set L=1 and
temp=first and process the statement as follows.
Loop:temp!=null
L=L+1
temp=temp.next
STEP-4 :Read the place  value where to insert the node
STEP-5 :Check the condition
 Check if[(place>0)&&(place<=(l=+1)]
Then Set i=1, prev=current=first
Loop:i<place
prev=current
Current=current.next
i=i+1
STEP-6 :temp.data=item
temp.next=current
Prevs.next=temp

Procedure for deleting node from beginning or middle or ending:

STEP-1 :Check whether the list having any node or nodes or 
not Check if first=null
Then print deletion is not possible.
STEP-2 :Read the node what we will delete placed in the list
named as “place variable”

STEP-3 :Finding the length of the current list set  L=1 and
         temp=first and process the statement as follows.
Loop:temp!=null
L=L+1
temp=temp.next
STEP-3 :Check the condition (place>0)&&(place<=L)
STEP-3.1 :Check if place=1
Then first= first.next
Other wise
Set i=1, prev=current=first
Loop:i<place
prev=current
Current=current.next
i=i+1
STEP-4 :prev.next = current.next

Procedure for searching or finding node on linked list:

STEP-1 :Read the element what we will find or searching the
list. The variable named as key
STEP-2 :Set temp=first, f=0
STEP-3 :Loop:temp!=null
STEP- 3.1 : Check if temp.data==key       
Then Set f=1 And Go to STEP-4
Otherwise
Go to STEP-3.2
STEP- 3.2 :Settemp=temp.next
STEP-4 :Check if f=1   
Then print element is found 
Otherwise
print the element is not found








PROGRAM:

import java.io.*;
import java.util.*;
class node
{
public int data;
public node next;
public node(int id)
{
data=id;
next=null;
}
}
class linkedlist
{
Scanner in= new Scanner(System.in);
public node first;
public node last;
public linkedlist()
{
first=null;
last=null;
}
public void create()throws IOException
{
int item;
do
{
System.out.println("\nEnter item or press -1 to
exit :");
item=in.nextInt();

if(item==-1)
break;

node temp=new node(item);


if(first == null)
{
first=last=temp;
}
else
{
last.next=temp;
last=temp;
}
}while(item!=-1);
}
public void display()
{
node temp;
if(first==null)
{
System.out.println("List is empty..");
}
else
{
temp=first;
while(temp!=null)
{
System.out.print(temp.data +" -> ");
temp=temp.next;
}
}
}
public intlength() // count the number of nodes
{
int l;
node temp=first;

for(l=1;temp!=null;l++,temp=temp.next);
return l;

}


public void insert()throws IOException
{
System.out.println("\nEnter place to insert :");
int place=in.nextInt();
if(place>0 && place<length()+1)
{
System.out.println("\nEnter item to insert :");
int item=in.nextInt();
node temp=new node(item);
if(place==1)
{
temp.next=first;
first=temp;
}
else
{
node current,previous;
current=first;
previous=first;
inti=1;
while(i<place)
{
previous=current;
current=current.next;
i++;
}
temp.next=current;
previous.next=temp;
}
}
else
{
System.out.println("\nNo Such place exist");
}
}




public void del()throws IOException
{
if(first==null)
{
System.out.println("List is empty..");
}
System.out.println("\nEnter place to delete :");
int place=in.nextInt();
if(place>0 && place<length())
{
if(place==1)
{
first=first.next;
}
else
{
nodecurrent,previous;
current=first;
previous=first;
inti=1;
while(i<place)
{
previous=current;
current=current.next;
i++;
}
previous.next=current.next;
}
}
else
{
System.out.println("\nNo Such place exist");
}
}





public void found(int key)
{
node temp=first;
int f=0;

while(temp!=null)
{
if(temp.data==key)
{
f=1;break;
}
temp=temp.next;
}

if(f==1)
System.out.println("Element Found");
else
System.out.println("Element Not Found");
}
}

class SingleLinkedList
{
public static void main(String[] args) throws IOException
{
DataInputStream ds = new DataInputStream(System.in);
linkedlist l =new linkedlist();
intch=0;
do
{
System.out.println("\n....Single Linked
List..\n");
System.out.println("1. create");
System.out.println("2. Display");
System.out.println("3. Find");
System.out.println("4. Insert");
System.out.println("5. Delete");
System.out.println("6. Exit");
System.out.println("Enter your choice..");
try
{
ch=Integer.parseInt(ds.readLine());
System.out.println("\n\n");
}
catch (Exception e) {}
switch(ch)
{
case 1: l.create(); break;
case 2: l.display(); break;
case 3: System.out.println("Enter item to
find..");
int key=Integer.parseInt
(ds.readLine());
l.found(key); break;
case 4: l.insert(); break;
case 5: l.del(); break;
case 6: System.exit(0);
}
}while (ch!=6);
}
}

















OUTPUT:

....SingleLinked List..
1. create
2. Display
3. Find
4. Insert
5. Delete
6. Exit
Enter your choice.. 1
Enter item or press -1 to exit :
10
20
30
40
50
60
-1
Enter your choice.. 2
10 -> 20 -> 30-> 40-> 50->60
Enter your choice.. 2
60 -> 50 -> 40-> 30-> 20->10
Enter your choice.. 4
Enter place to insert : 5
Enter number to insert: 35
Enter choice: 2
10 -> 20 -> 30-> 40-> 35->50->60
Enter your choice: 5
Element is not found
Enter your   choice: 6








2.Double Linked List

Procedure for Creation of Double Linked List:

STEP-1 :Declaring a variable named as “item”.ie the element
what we place in the linkedlist of the new node.       
STEP-2 : Read the value  in “item”.
Set first=last=null, next=null, previous=null
STEP-3 :Create a new node named as temp and assign the
         variable item to data part and assign Address of the
         node temp to null.
temp.data = item
temp.next = null
temp.pervious=null
STEP-4 :Check  the address part of the first node
Check if first=null
Then assign first=last=temp
Other wise
                 Then assign the new node to last.next = temp
temp.previous = last
last=temp
STEP-6: Repeat STEP-3 until you read required nodes.

Procedure for Display the Double linked list:
         
          To Display the information you have to traverse the list node by node from the first node until the end  of the list is reached.The following  STEP-s are followed to traverse a list either from left to right (or) right to left.

Traversal and Displaying list (from left to right):

STEP-1 :Check whether the list having nodes or not i.e
                Check if first=null
                    Then Print “list is Empty”
                 Other wise
                     Then Go to STEP-2

STEP-2 :Assign the node temp to first
               temp=first
STEP-2 :Repeat STEP-3 until temp not equal to null
               (temp!=null)
STEP-3 :Print temp.data and assign temp=temp.next

Traversal and Displaying list(from right to left):

STEP-1 :Check whether the list having nodes or not i.e
                Check if first=null
                    Then Print “list is Empty”
                 Other wise
                     Then Go to STEP-2
STEP-2 :Assign the node temp to first
               temp=last
STEP-2 :Repeat STEP-3 until temp not equal to null
               (temp!=null)
STEP-3 :Print temp.data and assign temp=temp.previous

Procedure for inserting  a node at middle and end of the linked list:

STEP-1 :Check whether the list having nodes or not i.e
Check if first=null
Then print it is not possible to insert node.
Since the first node itself containing anull
address value that indicates the linked list
does not have any node.
Other wise
Then Go to STEP- 2.
STEP-2 :We create a new node named as temp. we insert the new
         node temp at the middle of the list.
STEP-3 :Finding the length of the current list set  L=1 and
         temp=first and process the statement as follows.
Loop:temp!=null
L=L+1
temp=temp.next
STEP-4 :Read the place  value where to insert the node

STEP-5 :Check the condition (place>0)&&(place<=L+1)
                Check if place=1
                    Then temp.next=first
first.previous=temp
temp=first
STEP-6 :Check the condition
Then Set i=1, prev=current=first
Loop:i<place
prev=current
Current=current.next
i=i+1
STEP-7 :set temp.data=item
prev.next=temp
temp.next=current
current.previous=temp
temp.previous=prev

Procedure for deleting node beginning or middle or ending:

STEP-1 :Check whether the list having any node or nodes or
not Check if first=null
 Then print deletion is not possible.
STEP-2 :Read the node what we will delete placed in the list
named as “place variable”
STEP-3 :Finding the length of the current list set  L=1 and
temp=first and process the statement as follows.
Loop:temp!=null
L=L+1
temp=temp.next
STEP-3 :Check the condition (place>0)&&(place<=L)
STEP-3.1 :Check if place=1
Then  first= first.next
Other wise 
Set i=1, prev=current=first
Loop:i<place
prev=current
Current=current.next
i=i+1
STEP-4 :prev.next = current.next
Procedure for searching or finding node on linked list:

STEP-1 :Read the element what we will find or searching the
list. The variable named as key
STEP-2 :Set temp=first, f=0
STEP-3 : Loop: temp!=null
STEP-3.1 : Check if  temp.data==key       
Then Set f=1 And Go to STEP-4
Otherwise
Go to STEP-3.2
STEP-3.2 :Set temp=temp.next
STEP-4 :Check if f=1   
Then print element is found 
Otherwise
print the element is not found
























PROGRAM:

import java.util.*;
import java.io.*;
class node
{
public int data;
public node next, prev;
public node(int id)
{
data=id;
prev=null;
next=null;
}
}
class linkedlist
{
DataInputStream ds = new DataInputStream(System.in);
public node first;
public node last;
public linkedlist()
{
first=null;
last=null;
}
public void create()throws IOException
{
int item;
do
{
System.out.println("\nEnter item or press -1 to
exit :");
item=Integer.parseInt(ds.readLine());
node temp=new node(item);

if(item==-1)
break;


if(first == null)
first=last=temp;
else
{
temp.prev=last;
last.next=temp;
last=temp;
}
}while(item!=-1);
}
public void display()
{
node temp;
if(first==null)
{
System.out.println("List is empty..");
}

else
{
System.out.println("\nForward Direction
elements are :");
temp=first;
while(temp!=null)
{
System.out.print(temp.data +" => "); temp=temp.next;
}
System.out.println("\n\nBackward Direction
elements are :");
temp=last;
while(temp!=null)
{
System.out.print(temp.data +" <= "); temp=temp.prev;
}
}
}

public intlength() // count the number of nodes
{
int l;
node temp=first;
for(l=0;temp!=null;l++,temp=temp.next);
return l;
}
public void insert()throws IOException
{
System.out.println("\nEnter place to insert :");
int place=Integer.parseInt(ds.readLine());
if(place>0 && place<length()+1)
{
System.out.println("\nEnter item to insert :");
int item=Integer.parseInt(ds.readLine());
nodetemp=new node(item);
if(place==1)
{
temp.next=first;
first.prev=temp;
first=temp;
}
else
{
nodecurrent,previous;
current=first;
previous=first;
inti=1;
while(i<place)
{
previous=current;
current=current.next;
i++;
}
previous.next=temp;
temp.next=current;
current.prev=temp;
temp.prev=previous;
}
}
else
System.out.println("\nNo Such place exist");
}
public void del()throws IOException
{
if(first==null)
{
System.out.println("List is empty..");
}
else
{
System.out.println("\nEnter Place to delete
:");
int place=Integer.parseInt(ds.readLine());
if(place>0 && place<=length())
{
if(place==1)
{
first=first.next;
}
else
{
nodecurrent, previous;
current=first;
previous=first;
inti=1;
while(i<place)
{
previous=current;
current=current.next;
i++;
}
current=current.next
previous.next=current
current.prev=previous
}
}
}

else
System.out.println("\nNo Such place exist");
}
public void found(int key)
{
nodetemp=first; int f=0;
while(temp!=null)
{
if(temp.data==key)
{
f=1; break;
}
temp=temp.next;
}
if(f==1)
System.out.println("Element Found");
else
System.out.println("Element Not Found");
}
}
class DoubleLinkedList
{
public static void main(String[] args) throws IOException
{
DataInputStream ds = new DataInputStream(System.in);
linkedlist l =new linkedlist();
intch=0;
do
{
System.out.println("\n\n....Double Linked
List..");
System.out.println("1. create");
System.out.println("2. Display");
System.out.println("3. Find");
System.out.println("4. Insert");
System.out.println("5. Delete");
System.out.println("6. Exit");
System.out.println("Enter your choice..");

try
{
ch=Integer.parseInt(ds.readLine());
}
catch (Exception e) { }
switch(ch)
{
case 1: l.create(); break;
case 2: l.display(); break;
case 3: System.out.println("Enter item to
find..");
int key=Integer.parseInt
        (ds.readLine());
l.found(key); break;
case 4: l.insert(); break;
case 5: l.del(); break;
case 6: System.exit(0);
}
}while (ch!=6);
}
}


















OUTPUT:

....DoubleLinked List..

  1. Create
  2.  Display
  3. Insert
  4. Delete
  5. Search
  6. Exit
Enter your choice..
Enter item or press -1 to exit: 20
Enter item or press -1 to exit: 30
Enter item or press -1 to exit: 40
Enter item or press -1 to exit: 50
Enter item or press -1 to exit: -1

....DoubleLinked List..

  1. Create
  2. Display
  3. Insert
  4. Delete
  5. Search
  6. Exit
Enter your choice..
Forward Direction elements are :
20  => 30  => 40  => 50
Backward Direction elements are:
50  => 40  => 30  => 20

....DoubleLinked List..

  1. Create
  2. Display
  3. Insert
  4. Delete
  5. Search
  6. Exit
Enter your choice..4
Enter Place to delete: 2

....DoubleLinked List..

  1. Create
  2. Display
  3. Insert
  4. Delete
  5. Search
  6. Exit
Enter your choice..2
Forward Direction elements are :
20  => 40  => 50
Backward Direction elements are:
50  => 40  => 20

....DoubleLinked List..

  1. Create
  2. Display
  3. Insert
  4. Delete
  5. Search
  6. Exit
Enter your choice..5
Enter element to search: 40
Element is found.











3.STACK operations using ARRAYS

Note: Consider a single dimensional array. Set top=-1.

PUSH:

STEP-1 : Start
STEP-2 : Check if(top=4) then
     STEP-2.1 : print “Stack overflow”
     STEP-2.2 : Go to STEP-3
STEP-3 : Read number
STEP- 4 : top ß top+1. (Initially top = -1)
STEP-6 :a[top]= number.
STEP-7 : stop.

POP:

STEP-1 : Start
STEP-2 :Check if (top= -1) then
     STEP-2.1 :print “Stack underflow”
     STEP-2.2 :Go to STEP-3
STEP- 3 :numß a[top]
STEP- 4:top ß top-1
STEP-5:Stop.

DISPLAY:

STEP-1: Start
STEP-2:Check if (top = -1) then
STEP-2.1:Stack is empty (underflow)
STEP-2.2: Go to STEP-3
STEP-3 : Set i=top
STEP-4:Loop:i>=0
print a[i]
i=i-1
STEP-4: Stop.


PROGRAM:

import java.io.*;
import java.lang.*;
class stack
{
intnum,i,top;
inta[5];
DataInputStream ds = new DataInputStream(System.in);
Stack()
{
top= -1;
}
void push() throws Io Exception
{
if(top == 4)
{
System.out.println(”stack is full”);
}
else
{
System.out.println(”enter elements to be
inserted”);
num=Integer.parseInt(ds.readLine());
top=top+1;
a[top]=num;
System.out.println(num+”is inserted”);
}
}
Void pop()
{
if(top==-1)
{
System.out.println(”stack is empty”);
}




else
{
num=a[top];
top=top-1;
System.out.println(”num+”is deleted
successfully”);
}
}
Void display()
{
if(top==-1)
{
System.out.println(”stack is empty”);
}
else
{
for(i=top;i>=0;i--)
{
System.out.println(”a[i]+”\t”);
}
}
}
}
Class stackOperartion
{
Public static void main(String args[])
{
Stack s1=new stack();
DataInputStream ds = new DataInputStream(System.in);
intch=0;
do
{
System.out.println(”\t menu \t\n \n 1.push \n
2. Pop \n 3. Display \n 4.Exit”);
System.out.println(”enter choice”);
Ch= Integer.parseInt(ds.readLine());



Switch(ch)
{
Case 1: s1.push;break;
Case 2: s1.pop; break;
Case 3: s1.display;break;
Case 4: System.exit(0); break;
}
}While(ch!=4);
}
}





























OUTPUT:
Menu
          1.push
          2.pop
          3.display
          4.exit
enter your choice
1
Enter any number
10
10 is successfully inserted
Menu
          1.push
          2.pop
          3.display
          4.exit
enter your choice
1
Enter any number
20
20 is successfully inserted
Menu
          1.push
          2.pop
          3.display
          4.exit
enter your choice
1
Enter any number
30
30 is successfully inserted
Menu
          1.push
          2.pop
          3.display
          4.exit
enter your choice
1
Enter any number
40
40 is successfully inserted


Menu
          1.push
          2.pop
          3.display
          4.exit
enter your choice
1
Enter any number
50
50 is successfully inserted
Menu
          1.push
          2.pop
          3.display
          4.exit
enter your choice
3
50
40
30
20
10
Menu
          1.push
          2.pop
          3.display
          4.exit
enter your choice
1
stack is over flow
Menu
          1.push
          2.pop
          3.display
          4.exit
enter your choice
2
40  is successfully deleted
Menu
          1.push
          2.pop
          3.display
          4.exit
enter your choice
4

4.QUEUE operations using ARRAYS

Note:Declare a single dimensional array Set front=-1,Rare=-1.

INSERT at RARE:

STEP-1: Start
STEP-2:Check if (rare = 4) then
     STEP-2.1 : print “Queue is full”
     STEP-2.2 : Go to STEP-3
STEP-3:Check if (front = -1)
                Thenfront = front + 1
STEP-4:Read number
STEP- 5:rareßrare + 1
STEP- 6: a[rare] ßnum
STEP-7:Stop.

DELETE at FRONT:

STEP-1: Start
STEP-2:Check if (front = -1) then
     STEP-2.1: print “Queue is empty” deletion is not
possible.
     STEP-2.2:Go to STEP-3
STEP-3:Check if (front >rare)
     STEP-3.1: print “Queue has no elements” deletion
                      is not possible.
     Front=rare= -1
STEP-4:num= a[front]
STEP-5: front =front +1
STEP-6: Stop.







DISPLAY:

STEP-1 :Start
STEP-2 : Check if (front = -1) then
     STEP-2.1 : print “Queue is empty”
     STEP-2.2:Go to STEP-3
STEP-3 : Check if (front >rare) then
STEP-3.1 :print “Queue have no elements”
     front =rare= -1
     STEP-3.2 :Go to STEP-4
STEP-4 : Set i=front
STEP-5 : loop:i< = rare
     print a[i]
i=i+1
STEP-6 :Stop.





















PROGRAM:
class Queue
{
intnum, front,rare,i;
inta[]=new int[5];
DataInputStream ds = new DataInputStream(System.in);
Queue()
{
front=rare=-1;
}
void insert()throws IOException
{
if(rare==4)
{
System.out.println("Queue is full");
}
else
{
System.out.println("Enter any number to insert
:");
num=Integer.parseInt(ds.readLine());
if(front==-1)
{
front++;
rare++;
a[rare]=num;
System.out.println(num +" is successfully
inserted...");
}
}
}
void delete()
{
if( (front==-1) || (front>rare) )
{
System.out.println("Queue is empty..");
front=rare=-1;
}
else
{
num=a[front];
front++;
System.out.println(num +" is successfully
Deleted...");
}
}
void display()
{
if( (front==-1) || (front>rare) )
{
System.out.println("Queue is empty..");
front=rare=-1;
}
else
{
for(i=front;i<=rare; i++)
System.out.print("\t"+a[i]);
}
}
}
class QueOperations
{
public static void main(String[] args) throws IOException
{
Queue q = new Queue();
DataInputStream ds = new DataInputStream(System.in);
intch=0;
do
{
System.out.println("\tQueue Menu\n");
System.out.println("\t1. Insert\n");
System.out.println("\t2. Delete\n");
System.out.println("\t3. Display\n");
System.out.println("\t4. Exit\n");
System.out.println("\tEnter your choice :\n");
ch=Integer.parseInt(ds.readLine());
switch(ch)
{
case 1: q.insert(); break;
case 2: q.delete(); break;
case 3: q.display(); break;
case 4: System.exit(0);
}
}while (ch!=4);
}
}
OUTPUT:
Queue Menu
1. Insert
2. Delete
3. Display
4. Exit
Enter your choice:1
Enter any number
10
10 is successfully inserted

Queue Menu
1. Insert
2. Delete
3. Display
4. Exit
Enter your choice: 1
Enter any number: 20
20  is successfully inserted

Queue Menu
1. Insert
2. Delete
3. Display
4. Exit  
Enter your choice:1
Enter an number: 30
30 is successfully inserted

Queue Menu
1. Insert
2. Delete
3. Display
4. Exit  
Enter your choice:1
Enter an number: 40
40 is successfully inserted


Queue Menu
1. Insert
2. Delete
3. Display
4. Exit  
Enter your choice:1
Enter an number: 50
50 is successfully inserted

Queue Menu
1. Insert
2. Delete
3. Display
4. Exit  
Enter your choice:3
10 20 30 40 50

Queue Menu
1. Insert
2. Delete
3. Display
4. Exit
Enter your choice: 1
Queue is full

Queue Menu
1. Insert
2. Delete
3. Display
4. Exit
Enter your choice: 2
10 is successfully deleted
Queue Menu
1. Insert
2. Delete
3. Display
4. Exit
Enter your choice:3
20 30 40 50

INSERTION (Push Operation):

STEP-1:Allocate memory for the new node named as temp.
temp.data=item
temp.next=null
STEP-2 :Check if top = null
                Then temp.next = null
top = temp
Other wise
temp.next = top
top = temp

PrecedureforDELETION (Pop Operation):

STEP-1 : Check if top = null
               Then print “Stack is empty”
Otherwise
print top.
top = top.next

PrecedureforDISPLAY:

STEP-1 :  Check  If (top = null)
ThenPrint “Stack is empty”
Otherwise
Go to STEP-2.
STEP-2 :  set temp = top
STEP-3 :loop:temp ! = null
  Print temp.data
temp=temp.next






PROGRAM:

class node
{
int data;
node next;
node(intid)
{
data=id;
}
}
class linkedStack
{
node top, temp;
void push(int item)
{
temp=new node(item);
temp.next=top;
top=temp;
}
void pop()
{
if(top==null)
{
System.out.println("stack is empty");
}
else
{
node temp=top;
top=temp.next;
System.out.println("deleted
element"+temp.data);
}
}





void display()
{
if(top==null)
{
System.out.println("stack is empty");
}
else
{
temp=top;
System.out.println("stack elements are");
while (temp!=null)
{
System.out.println(temp.data);
temp=temp.next;
}
}
}
}
class StackLinkedList
{
public static void main(String args[])
{
linkedStack ls=new linkedStack();
ls.push(10);
ls.push(20);
ls.push(30);
ls.push(40);
ls.display();
ls.pop();
ls.display();
}
}







OUTPUT:

Stack elements are
10
20
30
40
Delete element 40
Stack elements are
10 20 30




























6.QUEUE operations using LINKED LIST

Procedure for INSERT an element in linear Queue:

STEP-1 :Allocate memory for the new node named as temp.
STEP-2 :Set temp.data = itme
temp.next=null
STEP-3 :Check if (front = null)
                Then Set front = rare = temp
Otherwise
Set rare.next = temp

Procedure for DELETING an element from the Queue:

STEP-1:Check If front = null
 Then print “Queue is empty”
Otherwise
Go to STEP-3.
STEP-2:print  front
STEP-3: front = front.next

Procedure for DISPLAY an element in the Queue:

STEP-1:Check if (front = null)
Then Print “Queue is empty”
Otherwise
Go to STEP-2.
STEP-2 :set temp = front
STEP-3:loop:temp != null
Print temp.data
set temp = temp.next







PROGRAM:

class node
{
int data;
node next;
public node(intid)
{
data=id;
}
}
class LinkedQueue
{
node front,rare;
public void insert(int item)
{
node temp=new node(item);
if(front==null)
{
front=rare=temp;
rare=temp;
}
}
public void remove()
{
if(front==null && rare=null)
{
System.out.println("queue is empty");
}
else
{         
int temp=front.data;
front=front.next;
System.out.println("deleted element is"+temp);
}
}
void display()
{
if(front==null &&rare==null)
{
System.out.println("queue is empty");
}
else
{
node temp=front;
System.out.println("queue elements are:");
while(temp!=null)
{
System.out.println(""+temp.data);
temp=temp.next;
}
}
}
}
class QueueLinkedList
{
public static void main(String args[])
{
LinkedQueuelq=new LinkedQueue();
lq.insert(10);
lq.insert(20);
lq.insert(30);
lq.insert(40);
lq.display();
lq.remove();
lq.display();
}
}















OUTPUT:

queue elements are:
10
20
30
40
deleted element is 10
queue elements are:
20
30
40


























7.Circular queue

Precedure for insertion :

STEP-1:Start
STEP-2:Check if (front =0 &&rare=max-1 )
 Then print circular queue is full
Other wise
Go toSTEP-3
STEP-3:read a value item
STEP-4:Check if (rare== -1)
Then rare=front=0, queue (rare) = item
     Other wise
               rare=(rare+1)%max_size;
     queue (rare) = item
STEP-5:  stop

Precedure for Deletion :

STEP-1:Start
STEP-2:Check if rare== -1  or front == rare
Then display queue is empty, set front =0,rare= -1
Other wise
     display queue[front]
     front = (front+1)%max_size
STEP-3:stop

Precedure for Displaying :

STEP-1:Start
STEP-2:Check if rare== -1  or front == rare
            Then display queue is empty, set front =0,rare= -1
Other wise
     set i= front;
     loop:i!=rare
     Display queue[i]
     i=(i+1)%max_size
STEP-3:stop
PROGRAM:

import java.io.*;
class CQueue
{
int front, rare, count, item, i;
inta[]=new int[5];
DataInputStream ds = new DataInputStream(System.in);
CQueue()
{
front=0;
rare=-1;
}
void insert() throws IOException
{
if (front =0 &&rare=max-1)
{
System.out.println("CQ is Full");
}
else
{
System.out.println("Enter element to insert in
CQ ");
item=Integer.parseInt(ds.readLine());
rare=(rare+1)%5;
a[rare]=item;
System.out.println(item +" is successfully
inserted");
}
}
void delete()
{
if (rare== -1 || front == rare)
{
System.out.println("CQ is empty");
front=0;
rare=-1;
}

else
{
item=a[front];
front=(front+1)%5;
System.out.println(item +" is successfully
Deleted");
}
}
void display()
{
if (rare== -1 || front == rare)
{
System.out.println("CQ is empty");
front=0;
rare=-1;
}
else
{
System.out.println("elements in CQ:");
for(i=front;i!=rare;i=(i+1)%5)
System.out.print(a[i] +"\t");
}
}
}
class CircularQoperations
{
public static void main(String[] args) throws IOException
{
DataInputStream ds = new DataInputStream(System.in);
CQueue q=new CQueue();
intch=0;
do
{
System.out.println("\n..Circular Queue ..\n");
System.out.println("1. Insert");
System.out.println("2. Delete");
System.out.println("3. Display");
System.out.println("4. Exit");
System.out.println("Enter your choice..");
ch=Integer.parseInt(ds.readLine());
System.out.println("\n\n");
switch(ch)
{
case 1: q.insert(); break;
case 2: q.delete(); break;
case 3: q.display(); break;
case 4: System.exit(0);
}
}while (ch!=4);
}
}



























OUTPUT:

..Circular Queue ..
1. Insert
2. Delete
3. Display
4. Exit
Enter your choice..1
Enter element to insert in CQ: 11
11 is successfully inserted
..Circular Queue..
1. Insert
2. Delete
3. Display
4. Exit
Enter your choice..1
Enter element to insert in CQ:22
22 is successfully inserted
..Circular Queue ..
1. Insert
2. Delete
3. Display
4. Exit
Enter your choice..1
Enter element to insert in CQ:33
33 is successfully inserted
..Circular Queue..
1. Insert
2. Delete
3. Display
4. Exit
Enter your choice..3
element in CQ:
11 22 33





..Circular Queue ..
1. Insert
2. Delete
3. Display
4. Exit
Enter your choice..2
11 is successfully Deleted































8.Precedure for double ended queue operation

Insertion front:

STEP-1:check if front == null
  Then queue is empty
     set front = rare = temp
     Otherwise
Go to STEP-2
STEP-2:setfront.prev = temp
     temp.next = front
     front = temp

Insertion rare:

STEP-1:check iffront == null
Then queue is empty
front = rare = temp
     Otherwise
Go to STEP-2
STEP-2:set rare .next = temp
     temp.prev =rare
     rare=temp 

Deletion at front :

STEP-1:check if front == null
Then queue is empty
     Otherwise
Go to STEP-2
STEP-2:front = front .next
     front.prev = null






Deletion at rare:

STEP-1:Check If rare == null || front == null
Then Print queue is empty
Otherwise
Go to STEP- 2
STEP-2: set rare= rare.prev
     rare.next =null

Display operation:

STEP-1: Check if rare == null || front == null
              Then Print queue is empty 
Otherwise
Go to STEP- 2
STEP-2:assign the node temp to front i.e, temp=front
STEP-2: loop:temp != null
print temp.data
     temp=temp.next




















PROGRAM:

import java.lang.*;
class node
{
public int data;
public node next;
public nodeprev;
public node(int id)
{
data=id;
next=null;
prev=null;
}
}
class dequeue
{
BufferedReader b=new BufferedReader(newInput.StreamReader
(System.in));
DataInputStream b=new DataInputStream(System.in);
public node front;
public noderare;
public dequeue()
{
front=null;
rare=null;
}
public void Display()
{
node temp;
temp=front;
while(temp!=null)
{
System.out.println(temp.data+"-->");
temp=temp.next;
}
System.out.println("NULL");
}

public void InsertFront() throws IO Exception
{
System.out.println("enter item");
int item= Integer.parseInt(b.readLine());
node temp=new node(item);
if(front==null)
{
front=rare=temp;
}
else
{
front.prev=temp;
temp.next=front;
front=temp;
}
}
public void InsertRare() throws IO Exception
{
System.out.println("enter element");
int item=Integer.parseInt(b.readLine());
node temp=new node(item);
if(front==null)
{
front=rare=temp;
}
else
{
rare.next=temp;
temp.prev=rare;
rare=temp;
}
}
public void DeleteFront() throws IO Exception
{
if(front==null)
{
System.out.println("underflow--");
}

else
{
front=front.next;
front.prev=null;
}
}
public void DeleteRare()
{
if(rare==null || front==null)
{   
System.out.println("underflow--");
}
else
{
rare=rare.prev;
rare.next=null;
}
}
}
class DoubleQueueDoubly
{
public static void main (String args[]) throws IO
Exception
{
intch;
BufferedReader b=new BufferedReader
(newInput.StreamReader(System.in));
DataInputStream b=new DataInputStream(System.in);
dequeue d=new dequeue();
do
{
System.out.println("1.InsertFront \n
2.InsertRare \n
3.DeleteFront \n
4.DeleteRare \n
5.Display \n 6.Exit");
System.out.println("enter your choice");
ch=Integer.parseInt(b.readLine());

switch(ch)
{
case 1: d.InsertFront(); break;
case 2: d.InsertRare(); break;
case 3: d.DeleteFront(); break;
case 4: d.DeleteRare(); break;
case 5: d.Display(); break;
}
}while(ch!=6);
}
}




























OUTPUT:

1. Insert Front
2. Insert Rare
3. Delete Front
4. Delete Rare
5. Display
6. Exit
Enter your choice:1
Enter item: 45
1.Insert Front
2.Insert Rare
3.Delete Front
4.Delete Rare
5.Display
6.Exit
Enter your choice:1
Enter item: 56
1.Insert Front
2.Insert Rare
3.Delete Front
4.Delete Rare
5.Display
6.Exit
Enter your choice: 5
56->45->null
1.Insert Front
2.Insert Rare
3.Delete Front
4.Delete Rare
5.Display
6.Exit
Enter your choice: 2






Enter Item: 67
1.Insert Front
2.Insert Rare
3.Delete Front
4.Delete Rare
5.Display
6.Exit
Enter your choice: 5
56->45->67->null
1.Insert Front
2.Insert Rare
3.Delete Front
4.Delete Rare
5.Display
6.Exit
Enter your choice: 3
1.Insert Front
2.Insert Rare
3.Delete Front
4.Delete Rare
5.Display
6.Exit
Enter your choice: 5
45->67->null
1.Insert Front
2.Insert Rare
3.Delete Front
4.Delete Rare
5.Display
6.Exit
Enter your choice:4
1.Insert Front
2.Insert Rare
3.Delete Front
4.Delete Rare
5.Display
6.Exit
Enter your choice:6

9.Binary search tree Traversal

Procedure for in order traversing:

STEP-1:check whether the tree is having root node (or) not
     If the does not having the root  node it is not
        possible for traversing. i.e,
        check if( root==null )
              then print traversing is not possible .
STEP-2:consider the nodes of next coming sub trees as local   
        “roots” and to move left side of the tree for this
purpose we need to call inorder() method recursively.
inorder(local root,left child)
STEP-3:now print the local part of the lacal root i.e,
print local root.data;
STEP-4:if the tree is not empty and contains right childs at
that time the functions inorder()recursively upto the
completion of all the nodes
inorder( root.rightchild)

Procedure for Preorder traversing:

STEP-1:check whether the tree is having root node (or) not
     If the does not having the root  node it is not
possible for traversing.
        Check if( root==null )
              Thenprint traversing is not possible .
STEP-2:consider the root nodes of next coming sub tree of
        “local roots” when ever the tree is not empty
STEP-3:print the data part of the root node / local root node
     i.e, print root data (or ) print local root.data
STEP-4:when the tree is not empty at that time move to the 
        left side of the tree and call the function preorder()
        recursively up to completion of all nodes
     preorder(localroot.leftchild) 
STEP-5:if the tree is not empty and contains right nodes at
        that time call preorder() recursively up to completin
of all nodesi.e, preorder(localroot.rightchild) 
Procedure for Post order traversal:

STEP-1:Check whether tree containing a root node or no. If
it does not having root node then its not possible to
traversal.
STEP-2:Consider the root node of the next coming subtree as 
”local root ” whenever the tree is not empty.
STEP-3:When the tree contains the left child node at that
time we need to call the method PostOrder()
recursively upto completion of all left nodes.
     PostOrder(localRoot.leftroot)
STEP-4:If the tree is not empty an contains right childs we
need to call the method PostOrder() recursively upto
completion of all the right child nodes.
     PostOrder(localRoot.rightChild)
     print data part of root node / local.root
      print localRoot.data / root.data






















PROGRAM:

import java.io.*;
class node
{
node left;
node right;
int data;
public node(int id)
{
data=id;
left=null;
right=null;
}
}
class BSearchingTree
{
DataInputStream ds=new DataInputStream(System.in);
public node root;
public BSearchingTree()
{
root=null;
}
public void create() throws IO Exception
{
int item;
do
{
System.out.println("enter item or press -1 to
exit");
item=Integer.parseInt(ds.readLine());
if(item==-1)
{
break;
}
node temp=new node (item);



if(root==null)
{
root=temp;
}
else
{
node current;
if(item<curremt.data)
{
current=current.left;
if(current==null)
{
current.left=temp;
}
else
{
Current=current.left;
}
}
else
{
current=curent.right;
if(current==null)
{
parent.right=temp;
}
else
{
Current=current.right;
}

}

}
} while(true);
}



public void inorder(node localRoot)
{
if(localRoot!=null)
{
inorder(localRoot.left);
system.out.println(localRoot.data);
inorder(localRoot.right);
}
}
public void preOrder(node localRoot)
{
if(localRoot!=null)
{
system.out.println(localRoot.data+" ");
preOrder(localRoot.left);
preOrder(localRoot.right);
}
}
public void postOrder(node localRoot)
{
if(localRoot!-null)
{
postOrder(localRoot.left);
postOrder(localRoot.right);
system.out.println(localRoot.data+" ");
}

}
}
class BinarySearchingTree
{
public static void main(String args[]) throws IO
Exception
{
DataInputStream ds=new DataInputStream(System.in);
BinarySearchingTreebt=new BinarySearchingTree();
intch;


do
{
system.out.println("\n binary searching tree
traversal");
system.out.println("\n 1.create \n
2.InOrder \n
 3.preOrder \n
4.postOrder \n
5.exit \n
                       Enter your choice \n");
ch=Integer.parseInt(ds.readLine());
switch(ch)
{
case 1: bt.create(); break;
case 2: System.out.println("inOrder
traverssal \n");
bt.inOrder(bt.root); break;
case 3:System.out.println("preOrder
traversing \n") ;
bt.preOrderOrder(bt.root); break;
case 4:System.out.println("postOrder
traversing \n") ;
bt.postOrder(bt.root); break;
case 5:System.exit(0); break;
default:System.out.println("invalid
entry");
}
}while(ch!=5);
}
}










OUTPUT:

Binary search tree traversal
1.Create
2.Inorder
3.Preorder
4.Postorder
5.Exit
Enter your choice:1
Enter item or press -1 to exit: 56
Enter item or press -1 to exit: 78
Enter item or press -1 to exit: 15
Enter item or press -1 to exit: 76
Enter item or press -1 to exit: 43
Enter item or press -1 to exit: 23
Enter item or press -1 to exit: 12
Enter item or press -1 to exit: -1
Binary search tree traversal
1.Create
2.Inorder
3.Preorder
4.Postorder
5.Exit
Enter your choice:2
Inorder traversing
12 15 23 43 56 76 78
Binary search tree traversal
1.Create
2.Inorder
3.Preorder
4.Postorder
5.Exit
Enter your choice:3
Preorder traversing
56 43 23 12 15 78 76



Binary search tree traversal
1.Create
2.Inorder
3.Preorder
4.Postorder
5.Exit
Enter your choice:4
Postorder traversing
15 12 23 43 76 78 56






























10.BINARY SEARCH

STEP-1: Declare an array a[]  initialize with specified size.
STEP-2:Read the elements into the array .
STEP-3:Initialize the segment variables as
     low=0
     high=n-1;
STEP-4:Declare a variable with the name as “key”. And read
the element value which will beto find into the
variable “key”.
STEP-5:check weather high>=low thenRepeatSTEP- 5.1 to 5.1.3
STEP-5.1:compute mid=(low+high)/2;
STEP-5.1.1:compare the search element with
the middle element in the
sorted list
           Check if a[mid]<key
           ThenSet low = mid+1;
STEP-5.1.2:check if a[mid]>key
ThenSet high = mid-1;
STEP-5.1.3:check if a[mid]==key
Then return middle index
                         element and Print
“elementis found” at
location middle index
Otherwise
print“element is not found.”
STEP-6:Stop












PROGRAM:

import java.util.*;
class BinarySearch
{
public static void main(String args[ ]) throws Exception
{
int mid, low, high, n, flag=0, i;
Scanner sc=new Scanner(System.in);
System.out.println(“Binary Search \n”);
System.out.println(“\nEnter how many elements :”);
n=sc.nextInt();
int[ ] a=new int[n];
System.out.println(“\nEnter Elements into array :”);

for(i=0;i<n;i++)
a[i]=sc.nextInt();

System.out.println(“\nEnter search key :”);
int key=sc.nextInt();
low=0;
high=n-1;
while(low<=high)
{
mid=(low+high)/2;
if(a[mid]==key)
{
System.out.print(“ Element Found at
:\n”+(mid+1));
flag=1;
break;
}

if(a[mid]<key)
low=mid+1;
else if(a[mid]>key)
high=mid-1;
}


if(flag==0)
System.out.print(“Element Not Found:\n”);
}
}


































OUTPUT:

D:\>java BinarySearch
Binary Search
Enter how many elements: 5
Elements into any array:
10 20 30 40 50
Enter search key: 30
Elements found at 3





























11.INSERTION SORT

STEP-1:Declare an array a[ ] initialize with specified size.
STEP-2:Read the element into the array from the keyboard.
STEP-3:Compare the second element of array with the first
element of array. Is the second element of array is
less than the first element of array then interchange
         the first element with second element.
STEP-4:Repeat STEP- 4.1 to STEP- 4.4 until i reaches to n
STEP-4.1:set temp=a[i];
STEP- 4.2:set j=i;
STEP- 4.3:check weather (j>0 )and (a[j-1]>temp) then
RepeatSTEP- 4.3.1and STEP- 4.3.2                      
STEP-4.3.1:set a[j]=a[j-1]
(move element forward )
STEP- 4.3.2:set j=j-1;
STEP- 4.4:set a[j]=temp
(insert element in proper position)
STEP-5:print the sorted elements and go to STEP- 6
STEP-6:Stop.

















PROGRAM:

import java.io.*;
class InsertionSort
{
public static void main(String[] args) throws IOException
{
DataInputStreamdiS= new DataInputStream(System.in);
inti,j,n,temp;
System.out.println("Enter n");
n=Integer.parseInt(dis.readLine());
inta[ ]=new int[n];
System.out.println("Enter "+n+" Elements");

for(i=0;i<n;i++)
a[i]=Integer.parseInt(dis.readLine());

for(i=0;i<n;i++)
{
temp=a[i];
j=i;
while(j>0 && a[j-1]>temp)
{
a[j]=a[j-1];
j--;
}
a[j]=temp;
}
System.out.println("Sorted Elements are...");

for(i=0;i<n;i++)
System.out.println(a[i]);
}
}





OUTPUT:

D:\>java InsertionSort
Enter n
7
Enter 7 Elements
21
34
14
11
77
33
87
Sorted Elements are...
11 14 21 33 34 77 87























12. QUICK SORT

STEP-1:Declare an array a[ ]  initialize with specified size.
STEP-2:Read the elements into the array from the keyboard.   
STEP-3:set i=l and j=u+1;
STEP-4:is( l<u) then set p=a[l];
STEP-4.1: Weather the following statements under
considered are true, repeat the following
                  STEP until the Boolean expression becomes
false
STEP-4.1.1:Repeat the following STEP
until a[i]<p
              STEP-4.1.1.1: set i=i+1;
          STEP-4.1.2:Repeat the following STEP-
              STEP-4.1.2.1:set j=j-1;
                   STEP-4.1.2.2: Check if (a[j]>p)
gotoSTEP-4.1.3
          STEP-4.1.3:is (i<j)
                              Then set  b=a[i];
                        set  a[i]=a[j];
                        set  a[j]=b;
          Otherwise go to STEP-4.2
STEP-4.2 :set  a[i]=a[j];
STEP-4.3 :set  a[j]=p;
STEP-4.4 :call quick sort ( a,l,j-1 )
STEP-4.5:  call quick sort ( a,j+1,u)
STEP-5:print the elements after sorting  and go to STEP-6.
STEP-6:stop.










PROGRAM:

import java.io.*;
class Sort
{
int[] a=new int[30];
inti,j,pivot, temp,n;
DataInputStream dis = new DataInputStream(System.in);
void getElements()throws IOException
{
System.out.println("Enter n value :");
n=Integer.parseInt(dis.readLine());
System.out.println("Enter :"+n+" Elements");

for(i=0;i<n;i++)
a[i]=Integer.parseInt(dis.readLine());
}
void showElements()
{
for(i=0;i<n;i++)
System.out.print(" "+a[i]);
}
void quicksort(int a[], int l, int u)
{
i=l;
j=u+1;
if(l<u)
{
pivot=a[l];
while(true)
{
do
{
i++;
}while (a[i]<pivot);




do
{
j--;
}while (a[j]>pivot);
if(i<j)
{
temp=a[i];
a[i]=a[j];
a[j]=temp;
}
else
break;
}
a[l]=a[j];
a[j]=pivot;
quicksort(a,l,j-1);
quicksort(a,j+1,u);
}
}
}
class QSort
{
public static void main(String[] args) throws IOException
{
Sort obj=new Sort();
obj.getElements();
System.out.println("\nBefore Sorting elements
are...");
obj.showElements();
obj.quicksort(obj.a,0,obj.n-1);
System.out.println("\nAfter Sorting elements
are...");
obj.showElements();
}
}




OUTPUT:

Enter n value: 5

Enter 5 elements:

20 10 9 25 15

Before sorting elements are:

20 10 9 25 15

After Sorting elements are:

9 10 15 20 15



Comments

  1. Hey !! Now Check new list of current online sweepstakes 2019.
    www.sweepstakesnew.com

    ReplyDelete
    Replies
    1. Rails is basically a web application framework, which is consist of everything needs to create database baked web application. It helps the developers to create websites and applications by providing structures for all codes written by them. Moreover, common repetitive tasks are simplified with the help of this technology.
      ruby on rails software house
      Popular rails gems and APIs
      Websites made with ruby
      Best ruby gems 2019
      React native and React Js
      Node Js and React Js

      Delete

  2. NICE for giving a chance to share ideas for your comuty i really thanks for that great post.
    Kayak Guru

    ReplyDelete

  3. Thank you for such a sweet tutorial - all this time later, I've found it and love the end result. I appreciate the time you spent sharing your skills.
    Hiking Gear

    ReplyDelete


  4. Thanks for sharing the information. It is very useful for my future. keep sharing
    Fishing Lab

    ReplyDelete
  5. Leading Web Design company in Nottingham UK. Our Experts are providing World's best Designs.Your satisfaction is our success.
    Your best Design of website effects your business presence. We know the nature of businesses and Designs.
    We just enjoy to play with Designs. Get quote now

    ReplyDelete
  6. Though the technical glitch scared a lot of people. It was just a publicity stunt to make the event even more interesting. The intention was good the question is. Is it necessary to make a fuss just before the big event? I don't think so.jogos friv gratis 2019
    Jogos 2019
    jogos friv
    abcya free games only

    ReplyDelete
  7. Rails is basically a web application framework, which is consist of everything needs to create database baked web application. It helps the developers to create websites and applications by providing structures for all codes written by them. Moreover, common repetitive tasks are simplified with the help of this technology.
    ruby on rails software house
    Popular rails gems and APIs
    Websites made with ruby
    Best ruby gems 2019
    React native and React Js
    Node Js and React Js

    ReplyDelete
  8. Do you have a spam issue on this website; I also am a blogger, and I was wondering your situation; many of us have developed some nice methods and we are looking to swap methods with others, please shoot me an e-mail if interested.
    managed services perth

    ReplyDelete
  9. Admiring the commitment you put into your blog and detailed information you present. It's great to come across a blog every once in a while that isn't the same unwanted rehashed material. Fantastic read! I've saved your site and I'm including your RSS feeds to my Google account.
    managed services perth

    ReplyDelete
  10. Great web site you have got here.. It’s hard to find quality writing like yours these days. I really appreciate individuals like you! Take care!!Hack Instagram

    ReplyDelete
  11. Boost Your Sales With Our Takeaway EPOS Software.
    Everything you need to run your business effectively
    1-Order Management System
    2-Customer Screen
    3-Kitchen Display Unit
    4-Postcode lookup
    5-Caller ID
    6-Intelligent Reporting
    EPOS For Takeaways
    EPOS System and Software
    EPOS System in Nottingham

    ReplyDelete
  12. This comment has been removed by the author.

    ReplyDelete
  13. iWebservices is a leading mobile app development company , Sandeep Maheshwari Quotes

    ReplyDelete
  14. Hello, i read your blog from time to time and i own a similar one and i was just curious if you get a lot of spam comments? If so how do you reduce it, any plugin or anything you can recommend? I get so much lately it's driving me insane so any support is very much appreciated.
    managed services perth

    ReplyDelete
  15. iWebservices is a leading mobile app development company , Get the most robust android app development services. Get in touch with us for top-notch Android app development services.

    Read More:- https://bit.ly/2NXoHxh

    ReplyDelete
  16. you need to have time to take care of the kids active.play exciting flash games. you want to relax after a stressful working hours, When you're tired, Thanks you for sharing! camping activities outdoor revivalmy travel trips

    ReplyDelete
  17. Great web site you have got here.. It’s hard to find quality writing like yours these days. I really appreciate individuals like you! Take care!!

    thepiratebay mirror proxy
    the pirate bay alternatives
    torlock mirror proxy
    torrentz2 mirror proxy

    ReplyDelete
  18. I am very happy when read this blog post because blog post written in good manner and write on good topic. Thanks for sharing valuable information about AWS Course.Excellent Blog!!! The blog which you have shared here is more informative, This is really too useful and have more ideas and keep sharing many techniques about java. Thanks for giving a such a wonderful blog. oscillating tool tips Projects with Oscillating Tool Oscillating Tool Tips Remove Grout with Oscillating Tool

    ReplyDelete
  19. I’ll immediately grab your rss feed as I can't find your email subscription link or e-newsletter service. Do you have any? Please let me know so that I could subscribe. Thanks.mac reparieren berlin

    ReplyDelete

Post a Comment

Popular posts from this blog

Characteristics of computers

    Characteristics:        All computers have similar characteristics, which tells how computers are efficient to perform task. Computers have some Limitations also. Speed:     Computer can work very fast. It takes only few seconds for calculations on very large amount of data. Computer can perform millions (1,000,000) of instructions per second.      We measure the speed of computer in terms of microsecond (10-6 part of a second) or nanosecond (10 to the power -9 part of a second).   Accuracy:        The degree of accuracy of computer is very high and every calculation is performed with the same accuracy.  The errors in computer are due to human and inaccurate data.       The calculation done by computer are 100% error free, If we provide accurate input. Diligence:        A computer is free from tiredness, lack of concentration...

LEVELS AND CURVES

LEVELS:                 Levels are used to set the shadows, mid tone etc.  O pen an image on Photoshop window. Select image menu on menu bar than adjustments than levels. A dialogue box will appear on screen which shows three pointers which indicates three optimum. The black triangle indicates shadows and gray triangle indicates mid tone and white triangle indicates highlights. In the channel menu different options are provided in drop down list. Make sure select on preview, which gives current adjustments on your picture. CURVES: Curves are to  similar to levels, it gives more power to control shadows highlights and mid tones. One of the simplest adjustment we can make with curves is increasing the contrast. Go to image menu and than adjustments,than curves. Dialogue box will appear on screen with straight diagonal line.      ...