## Binary Tree Post-Order Traversal Iterative Solution

October 27, 2010

Given a binary tree, print the elements in post-order iteratively without using recursion.

## Print Edge Nodes (Boundary) of a Binary Tree

October 20, 2010

Print all edge nodes of a complete binary tree anti-clockwise.
That is all the left most nodes starting at root, then the leaves left to right and finally all the rightmost nodes.
In other words, print the boundary of the tree.

Variant: Print the same for a tree that is not complete.

## Implement strstr() to Find a Substring in a String

October 14, 2010 in string

Write C code to implement the strstr (Search for a substring) function. Do not use any system library such as strlen.

## Searching a 2D Sorted Matrix Part III

October 13, 2010

Write an efficient algorithm that searches for a value in an n x m table (two-dimensional array). This table is sorted along the rows and columns — that is,

Table[i][j] ≤ Table[i][j + 1],
Table[i][j] ≤ Table[i + 1][j]

## Searching a 2D Sorted Matrix Part II

October 8, 2010

Write an efficient algorithm that searches for a value in an n x m table (two-dimensional array). This table is sorted along the rows and columns — that is,

Table[i][j] ≤ Table[i][j + 1],
Table[i][j] ≤ Table[i + 1][j]

## Searching a 2D Sorted Matrix Part I

October 6, 2010

Write an efficient algorithm that searches for a value in an n x m table (two-dimensional array). This table is sorted along the rows and columns — that is,

Table[i][j] ≤ Table[i][j + 1],
Table[i][j] ≤ Table[i + 1][j]

## Excel Sheet Row Numbers

October 1, 2010

Given the sequence S1 = {a,b,c,d,…,x,y,z,aa,ab,ac…. } and given that this sequence corresponds (term for term) to the sequence S2 = {0,1,2,3,….}. Write code to convert an element of S2 to the corresponding element of S1.