Thread: Help with a search algorithm

  1. #1
    Registered User
    Join Date
    Jun 2010
    Posts
    1

    Help with a search algorithm

    hi all..i need your help about a search algorithm....i have a word file and i want to search some words hidden in it
    this is what i want:

    Identify the hidden words in the list of characters. The words can be written in the table horizontally, vertically or diagonally in both directions. Some letters in the table may belonging to more than one word. After finding all the words, the program reads the letters table does not belong to any of the hidden words. Presentation letters will be in the order they are on the table (from left to right and from top to bottom).

  2. #2
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    39,660
    Have you got as far as a loop to print each character of the grid?

    So when you've got as far as
    printf( "%d %d %c\n", x, y, grid[y][x] );

    You can think about
    findWordsStartingAtThisPosition( x, y, grid[y][x] );
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Search function not working fully
    By tabstop in forum C Programming
    Replies: 7
    Last Post: 12-04-2008, 02:57 AM
  2. Attempt to write function search()
    By elsewhere in forum C Programming
    Replies: 6
    Last Post: 12-03-2008, 08:18 AM
  3. Simple search program
    By colinuk in forum C Programming
    Replies: 6
    Last Post: 12-18-2004, 01:58 AM
  4. Contest Results - May 27, 2002
    By ygfperson in forum A Brief History of Cprogramming.com
    Replies: 18
    Last Post: 06-18-2002, 01:27 PM
  5. Search Engines :: Winsock
    By kuphryn in forum Windows Programming
    Replies: 3
    Last Post: 06-18-2002, 12:31 PM