Question: I am new to iphone development.I want insert my xml parsed contents into a sqlite3 database and retrieve it and display it in a tableView.I am able to parse and directly display the contents using nsxml parser.Please help me how to proceed to store the contents in a database and retrieve it .Thanks.

Answer: 
Keep first letters of each word your looking for in a list or some such data structure. Search every letter in order. If it is the first letter of a word you're searching for, then search every letter around it for a second letter. If you find a second letter in a word then note the direction in a word object that has a direction enum, i.e. {N = 0, NE, E, SE, S, SW, W, NW}. Then simply follow that direction until you have determined the word isn't found or is found. They key is for the search object to know how many words it's looking at. So if you're looking for both cater and cattle, if you find C-A-T going northeast, it could be either. Also, if you find an F you will need to make sure to check every direction because you can have FRIAR going east and FAT going west. Then it's as simple as making sure you don't go out of bounds because NE is X+1 Y-1, etc...
Do NOT use a 2 dimensional array for the puzzle. For an NxM word search, use an array of (N+2)\*(M+2). Put padding of 1 character all the way around your puzzle. So the example becomes:

```

......
.BXXD.
.AXEX.
.TRXX.
.FXXX.
......

```

Where the periods are the padding and all of this is really a 1d array.

Calling the width of the new grid the row span (S), you can now create an array of 8 direction "vectors" D=[ -S-1, -S, -S+1, -1, 1, S-1, S, S+1 ]. Using this, you can look from any position in the grid Puzzle[position] to its neighbor in any direction by using Puzzle[position+D[direction]].

Your position of course is now a single variable instead of a pair of coordinates. The padding around the border tells you if you've reached the edge of the board and should be a character that is never used in the interior of the puzzle.