[algogeeks] Re: Matrix Searching

2012-09-14 Thread Don
I had to do something like this with a large list of words to search
for. If you're just looking for one word, look for the first letter,
and when you find it, look at adjacent locations for the second
letter. If found, continue in that direction matching letters until
you either match the whole word or don't.

But for a big list of words to search for, it was faster to do
something like this:
Build a frequency count for each character, along with a list of
ordered pairs indicating where that character is located. Then, to
look for a word, find the character with the smallest frequency count
and step through the list for that character. At each location, look
for the character before/after that character in the word on opposite
sides of the initial location, and continue from there.

Don

On Sep 14, 2:47 pm, Arun Kindra  wrote:
> *You have given any n*n matrix in which characters are stored and you have
> to search that a given word is present or not.(words can be horizontally,
> vertically, diagonally)*

-- 
You received this message because you are subscribed to the Google Groups 
"Algorithm Geeks" group.
To post to this group, send email to algogeeks@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



[algogeeks] Matrix Searching

2012-09-14 Thread Arun Kindra
*You have given any n*n matrix in which characters are stored and you have
to search that a given word is present or not.(words can be horizontally,
vertically, diagonally)*

-- 
You received this message because you are subscribed to the Google Groups 
"Algorithm Geeks" group.
To post to this group, send email to algogeeks@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



[algogeeks] Can't Be able to run Program in Visual Studio (2012)

2012-09-14 Thread VIHARRI
Hi, I have a problem while executing. The compiler shows the following 
errors :

1>-- Build started: Project: HareKrishna, Configuration: Debug Win32 
--
1>  Main.cpp
**
1>  c:\program files (x86)\windows 
kits\8.0\include\um\winnt.h(7751) : see previous definition of 
'ReadUCharRaw'
1>c:\program files (x86)\windows kits\8.0\include\km\wdm.h(4203): error 
C3861: 'ReadRaw8': identifier not found
1>c:\program files (x86)\windows kits\8.0\include\km\wdm.h(4213): error 
C2084: function 'void WriteUCharRelease(volatile BYTE *,BYTE)' already has 
a body
1>  c:\program files (x86)\windows 
kits\8.0\include\um\winnt.h(7762) : see previous definition of 
'WriteUCharRelease'
1>c:\program files (x86)\windows kits\8.0\include\km\wdm.h(4215): error 
C3861: 'WriteRelease8': identifier not found
1>c:\program files (x86)\windows kits\8.0\include\km\wdm.h(4226): error 
C2084: function 'void WriteUCharNoFence(volatile BYTE *,BYTE)' already has 
a body
1>  c:\program files (x86)\windows 
kits\8.0\include\um\winnt.h(7775) : see previous definition of 
'WriteUCharNoFence'
1>c:\program files (x86)\windows kits\8.0\include\km\wdm.h(4228): error 
C3861: 'WriteNoFence8': identifier not found
1>c:\program files (x86)\windows kits\8.0\include\km\wdm.h(4239): error 
C2084: function 'void WriteUCharRaw(volatile BYTE *,BYTE)' already has a 
body
1>  c:\program files (x86)\windows 
kits\8.0\include\um\winnt.h(7788) : see previous definition of 
'WriteUCharRaw'
1>c:\program files (x86)\windows kits\8.0\include\km\wdm.h(4241): error 
C3861: 'WriteRaw8': identifier not found
1>c:\program files (x86)\windows kits\8.0\include\km\wdm.h(4251): error 
C2084: function 'WORD ReadUShortAcquire(volatile const WORD *)' already has 
a body
1>  c:\program files (x86)\windows 
kits\8.0\include\um\winnt.h(7801) : see previous definition of 
'ReadUShortAcquire'
1>c:\program files (x86)\windows kits\8.0\include\km\wdm.h(4253): error 
C3861: 'ReadAcquire16': identifier not found
1>c:\program files (x86)\windows kits\8.0\include\km\wdm.h(4262): error 
C2084: function 'WORD ReadUShortNoFence(volatile const WORD *)' already has 
a body
1>  c:\program files (x86)\windows 
kits\8.0\include\um\winnt.h(7812) : see previous definition of 
'ReadUShortNoFence'
1>c:\program files (x86)\windows kits\8.0\include\km\wdm.h(4264): error 
C3861: 'ReadNoFence16': identifier not found
1>c:\program files (x86)\windows kits\8.0\include\km\wdm.h(4273): error 
C2084: function 'WORD ReadUShortRaw(volatile const WORD *)' already has a 
body
1>  c:\program files (x86)\windows 
kits\8.0\include\um\winnt.h(7823) : see previous definition of 
'ReadUShortRaw'
1>c:\program files (x86)\windows kits\8.0\include\km\wdm.h(4275): error 
C3861: 'ReadRaw16': identifier not found
1>c:\program files (x86)\windows kits\8.0\include\km\wdm.h(4285): error 
C2084: function 'void WriteUShortRelease(volatile WORD *,WORD)' already has 
a body
1>  c:\program files (x86)\windows 
kits\8.0\include\um\winnt.h(7834) : see previous definition of 
'WriteUShortRelease'
1>c:\program files (x86)\windows kits\8.0\include\km\wdm.h(4287): error 
C3861: 'WriteRelease16': identifier not found
1>c:\program files (x86)\windows kits\8.0\include\km\wdm.h(4298): error 
C2084: function 'void WriteUShortNoFence(volatile WORD *,WORD)' already has 
a body
1>  c:\program files (x86)\windows 
kits\8.0\include\um\winnt.h(7847) : see previous definition of 
'WriteUShortNoFence'
1>c:\program files (x86)\windows kits\8.0\include\km\wdm.h(4300): error 
C3861: 'WriteNoFence16': identifier not found
1>c:\program files (x86)\windows kits\8.0\include\km\wdm.h(4311): error 
C2084: function 'void WriteUShortRaw(volatile WORD *,WORD)' already has a 
body
1>  c:\program files (x86)\windows 
kits\8.0\include\um\winnt.h(7860) : see previous definition of 
'WriteUShortRaw'
1>c:\program files (x86)\windows kits\8.0\include\km\wdm.h(4313): error 
C3861: 'WriteRaw16': identifier not found
1>c:\program files (x86)\windows kits\8.0\include\km\wdm.h(4323): error 
C2084: function 'DWORD ReadULongAcquire(volatile const DWORD *)' already 
has a body
1>  c:\program files (x86)\windows 
kits\8.0\include\um\winnt.h(7873) : see previous definition of 
'ReadULongAcquire'
1>c:\program files (x86)\windows kits\8.0\include\km\wdm.h(4325): error 
C3861: 'ReadAcquire': identifier not found
1>c:\program files (x86)\windows kits\8.0\include\km\wdm.h(4334): error 
C2084: function 'DWORD ReadULongNoFence(volatile const DWORD *)' already 
has a body
1>  c:\program files (x86)\windows 
kits\8.0\include\um\winnt.h(7884) : see previous definition of 
'ReadULongNoFence'
1>c:\program files (x86)\windows kits\8.0\include\km\wdm.h(4336): error 
C3861: 'ReadNoFence': identifier not found
1>c:\program files (x86)\windows kits\8.0\include\km\wdm.h(4345): error 
C2084: function 'DWORD ReadULongRaw(volatile const DWORD *)' al

Re: [algogeeks] Adobe Written Test - 25 SEPT 2010

2012-09-14 Thread Bhupendra Dubey
Which edition of barron?

On Wed, Sep 28, 2011 at 6:05 PM, VIHARRI  wrote:

> 1. Java uses stack for byte code in JVM - each instruction is of one
> byte, so how many such instructions are possible in an operating
> system.
>
> 2. Three processes p1, p2, p3, p4 - each have sizes 1GB, 1.2GB, 2GB,
> 1GB. And each processes is executed as a time sharing fashion. Will
> they be executed on an operating system.
>
> 3. write a recursive program for reversing the linked list.
>
> 4. write a program for checking the given number is a palindrome.
> ( dont use string / array for converting number ).
>
> 5. write a recursive program for multiplying two numbers a and b, with
> additions. The program should take care of doing min # additions as
> that of which ever number is lower between a and b.
>
> 6. There are two sets A and B with n integers, write a program to
> check the whether there exists two numbers a in A and b in B such that
> a+b = val ( val is given );
>
> 7. write a program to return the row number which has max no of one's
> in an array of NxN matrix where all 1's occur before any 0's starts.
>
> 8. For every number that has 3 in its units place has one multiple
> which has all one's i.e. 111 is such multiple and 13 has a multiple
> 11. Write a program to find such multiple for any number that has
> 3 at its units place.
>
> 9. what are the maximum no of edges that can be connected in a graph
> of n vertices and 0 edges such that after adding edges given graph is
> still disconnected.
>
> 10. One Question on critical section.
>
> For Analytical Test - Prepare the Questions in the barrons book of
> sample paper - 2 ( they have give two passages )
>
> --
> You received this message because you are subscribed to the Google Groups
> "Algorithm Geeks" group.
> To post to this group, send email to algogeeks@googlegroups.com.
> To unsubscribe from this group, send email to
> algogeeks+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/algogeeks?hl=en.
>
>


-- 
Thanks & regards
Bhupendra

-- 
You received this message because you are subscribed to the Google Groups 
"Algorithm Geeks" group.
To post to this group, send email to algogeeks@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.