• Algorithms, OOPs Lab Programs

    Posted on April 27th, 2011

    Written by Geek

    Tags

    ALGORITHM TO IMPLEMENT QUEUE AS LINKED LIST

    ALGORITHM TO IMPLEMENT QUEUE AS LINKED LIST CREATE 1. t = new node 2. Enter info to be inserted 3. Read n 4. t info = n breve 5. t next = front breve 6. front = t INSERTION 1. r next = t breve 2. t next = NULL breve 3. Return DELETION 1. [...]

    Print Friendly
  • Algorithms, OOPs Lab Programs

    Posted on April 23rd, 2011

    Written by Geek

    Tags

    ALGORITHM TO IMPLEMENT DOUBLE LINKED LIST

    ALGORITHM TO IMPLEMENT DOUBLE LINKED LIST 1. t = new node 2. Enter “the info to be inserted” 3. Read n 4. t info = n breve 5. t next = NULL breve 6. t prev NULL breve INSERTION BEGIN 1. If start = NULL start = t 2. else t next = NULL breve [...]

    Print Friendly
  • Algorithms, OOPs Lab Programs

    Posted on April 23rd, 2011

    Written by Geek

    Tags

    ALGORITHM TO IMPLEMENT LINKED LIST

    ALGORITHM TO IMPLEMENT LINKED LIST 1. t = newmode( ) 2. Enter info to be inserted 3. Read n 4. t info = n breve 5. t next = start breve 6. Start = t INSERTION BEGIN 1. t next = start breve 2. start = t Return MIDDLE 1. Enter info of the node [...]

    Print Friendly
  • Algorithms, OOPs Lab Programs

    Posted on April 18th, 2011

    Written by Geek

    Tags

    ALGORITHM TO IMPLEMENT BINARY SEARCH TREE

    BINARY SEARCH TREE INSERTION ALGORITHM 1. t = newnode 2. t info = n breve 3. t left = t right = NULL breve breve 4. If (root = NULL) root = t return 5. ptr = root 6. Repeat step 7 until ptr = NULL 7. If (ptr info > n) breve If (ptr left [...]

    Print Friendly
  • Algorithms, OOPs Lab Programs

    Posted on April 18th, 2011

    Written by Geek

    Tags

    , , , ,

    ALGORITHM TO SORT ARRAY USING QUICK SORT

    1. low =1, high = h, key a[(l+h)/2] 2. Repeat through step 7 while (low <= high) 3. Repeat step 4 while (a[low] < key) 4. low = low +1 5. Repeat step 6 while (a[high] > key) 6. high = high- 1 7. If (low <= high) a) temp = a[low] b) a[low] = [...]

    Print Friendly
  • Algorithms, OOPs Lab Programs

    Posted on April 13th, 2011

    Written by Geek

    Tags

    ALGORITHM TO SEARCH AN ELEMENT USING BINARY SEARCH

    Steps to follow low = l ,high = n Repeat step 3 to 5 while low <= high mid = (low + high) If a[ mid] = x Print “found at mid” Return If (a[ mid] < x) low = mid + 1 Else High = mid – I Print “x not found” Exit // [...]

    Print Friendly
  • Algorithms, OOPs Lab Programs

    Posted on April 12th, 2011

    Written by Geek

    Tags

    ALGORITHM TO SEARCH AN ELEMENT USING LINEAR SEARCH

    Steps for Algorithm to search an element using linear search 1. Set k := 1 & loc : = 0 2. Repeat step 3 & 4 while loc: = 0 &k < = n 3. If (item = data[k]) loc: = k Else K= k + 1 4. If loc: = 0 ,then Print “no. [...]

    Print Friendly
  • Newer Posts Yeah! There are more posts, check them out.

Switch to our mobile site

PHVsPjwvdWw+