skip to main | skip to sidebar

Data Structures Notes

Wednesday, February 11, 2009

Algorithm to print-all-pairs in the tables (X, Y)

PrintAllPairs(X[0, 1, 2, ..., n-1], Y[0, 1, 2, ..., m-1])
01 for i<-0 to n-1 do
02 for j<-0 to m-1 do
03 Print(X[i], Y[j])
04 end for
05 end for
Posted by Nash at 7:14 AM
Labels: algorithm, array, Matrix, Pair Printing

No comments:

Post a Comment

Newer Post Older Post Home
Subscribe to: Post Comments (Atom)

Unique Visitors

Blog Archive

  • ▼  2009 (44)
    • ►  March (26)
    • ▼  February (18)
      • Binary tree traversal: Preorder, Inorder, and Post...
      • String Searching Algorithm - KMP Algorithm
      • Exercise-Radix Sorting
      • Exercise-Manipulating an element in an array (Repl...
      • Exercise-Reverse Polish Notation (RPN)
      • Sorting Algorithm - HeapSort & Heapify
      • Algorithm that returns the middle element of a dou...
      • Time complexity - Omega of data structures
      • Time complexity - Omega of algorithms
      • Checklist before selecting the right data structur...
      • Algorithm to print-all-pairs in the tables (X, Y)
      • Algorithm to Sum-up n number of items in the table
      • Time complexity of algorithms - In particular Big ...
      • Operation time complexity for a LINKED LIST
      • Operation time complexity for an ARRAY
      • Selection Sorting An Array
      • Bubble Sorting An Array
      • Computing The Median of An Array

About Me

Nash
View my complete profile