Re: [algogeeks] Re: Find all words in given character Matrix

2013-01-18 Thread Raghavan
May be this stackoverflow link could answer your question,
http://stackoverflow.com/questions/746082/how-to-find-list-of-possible-words-from-a-letter-matrix-boggle-solver


On Fri, Jan 18, 2013 at 2:54 AM, Piyush  wrote:

> On 18-Jan-13 1:57 PM, Sairam wrote:
>
>>
>> Is it that all characters in a row, column and diagnol should be
>> considered?
>>
>> For example
>>  a b c d
>>  c a t d
>>
>> In this is cat a valid word?
>>
> yes
>
>> --
>>
>>
>>
> i will elaborate more
>
> e b  a  t
> m e m o
>
> valid words
> bat
> at
> be
> to
> am
> me
> memo
>
> print them, not required unique list
>
> I will at each (i,j) --search up, down, left and right for words
>
> any better way?
>
> --
>
>
>


-- 
Thanks and Regards,
Raghavan KL

-- 




Re: [algogeeks] Re: Find all words in given character Matrix

2013-01-18 Thread Piyush

On 18-Jan-13 1:57 PM, Sairam wrote:


Is it that all characters in a row, column and diagnol should be 
considered?


For example
 a b c d
 c a t d

In this is cat a valid word?

yes

--




i will elaborate more

e b  a  t
m e m o

valid words
bat
at
be
to
am
me
memo

print them, not required unique list

I will at each (i,j) --search up, down, left and right for words

any better way?

--




Re: [algogeeks] Re: Find all words in given character Matrix

2013-01-18 Thread Sairam

Is it that all characters in a row, column and diagnol should be considered?

For example
 a b c d
 c a t d

In this is cat a valid word?

-- 




Re: [algogeeks] Re: Find all words in given character Matrix

2013-01-17 Thread Piyush

Assume given a function will allows checking given string is a word or not
(so dictionary is already present)

On 18-01-2013 00:00, rahul wrote:
are u maintaining any known list of word from dictionary , if not , it 
might have lots of words some of them doesn't have any meaning   :-), 
please give clear picture of what you want to achieve.


On Thu, Jan 17, 2013 at 11:49 PM, Don > wrote:


Store the word list in a trie. Starting at each location in the
matrix, search the trie for the patterns formed in each direction.

On Jan 17, 12:33 pm, Piyush mailto:piyush.to...@gmail.com>> wrote:
> Given a MxN char array matrix, find all words in it. search
left, right,
> diagonally

--



--




--




Re: [algogeeks] Re: Find all words in given character Matrix

2013-01-17 Thread rahul
are u maintaining any known list of word from dictionary , if not , it
might have lots of words some of them doesn't have any meaning   :-),
please give clear picture of what you want to achieve.

On Thu, Jan 17, 2013 at 11:49 PM, Don  wrote:

> Store the word list in a trie. Starting at each location in the
> matrix, search the trie for the patterns formed in each direction.
>
> On Jan 17, 12:33 pm, Piyush  wrote:
> > Given a MxN char array matrix, find all words in it. search left, right,
> > diagonally
>
> --
>
>
>

--