473,396 Members | 1,706 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

find a string in a grid

Hi guys,

These are some MS questions which i encountered in a recent interview.
Hope it'll be helpfull to some of you.

#1. Given an n X m grid of characters. You are supposed to search for
a string with in this maze. The characters in the string need not be
alligned in a straight line. They just need to be holding adjusent
positiong.

eg

if this is a maze

a b d e f
r n a j u
g y m r l
e t i y u

The string namit should return a found(True "2,2 2,3 3,3 4,3 4,2" They
hold adjucent positions).

Jul 23 '05 #1
11 1889
puzzlecracker wrote:
Hi guys,

[way OT redacted]


That's nice. And your C++ question was?
Jul 23 '05 #2
That's nice. And your C++ question was?


answer it in C++, what a gleeful venture!

Jul 23 '05 #3
puzzlecracker wrote:

[ ... ]
answer it in C++, what a gleeful venture!


Apparently you take glee in recursion?

--
Later,
Jerry.

The universe is a figment of its own imagination.

Jul 23 '05 #4
Jerry Coffin wrote:
Apparently you take glee in recursion?

What recursion? Why recursion? :-)

--
Ioannis Vranos

http://www23.brinkster.com/noicys
Jul 23 '05 #5
puzzlecracker wrote:
That's nice. And your C++ question was?


answer it in C++, what a gleeful venture!


Why should we?
Besides: it is relatively simple to do. No challenge
in that. A quick estimate: less then one hour, probably
more in the range of half an hour (with testing).
--
Karl Heinz Buchegger
kb******@gascad.at
Jul 23 '05 #6

Karl Heinz Buchegger wrote:
puzzlecracker wrote:
That's nice. And your C++ question was?


answer it in C++, what a gleeful venture!


Why should we?
Besides: it is relatively simple to do. No challenge
in that. A quick estimate: less then one hour, probably
more in the range of half an hour (with testing).
--
Karl Heinz Buchegger
kb******@gascad.at

IT IS NOT SO SIMPLE TO COME UP WITH EFFICIENT SOLUTION

Jul 23 '05 #7
puzzlecracker wrote:

Karl Heinz Buchegger wrote:
puzzlecracker wrote:

> That's nice. And your C++ question was?

answer it in C++, what a gleeful venture!


Why should we?
Besides: it is relatively simple to do. No challenge
in that. A quick estimate: less then one hour, probably
more in the range of half an hour (with testing).
--
Karl Heinz Buchegger
kb******@gascad.at


IT IS NOT SO SIMPLE TO COME UP WITH EFFICIENT SOLUTION


First make it work, then make it work fast.
Do you have a working solution?

--
Karl Heinz Buchegger
kb******@gascad.at
Jul 23 '05 #8
puzzlecracker wrote:

IT IS NOT SO SIMPLE TO COME UP WITH EFFICIENT SOLUTION


Since when does Microsoft care about efficient solutions? The MS
interviewer will grade the solution based on:

1) whether it has a catchy, trademarkable name

2) whether you implemented a pop-up Clippy window to ask for help
running the program

3) how many service packs can be released for the program, and whether
or not MS might be able to charge for them

4) whether there are any ridiculously simple algorithms in the program
that MS can patent, then use the patents to sue other companies

Actually working *at all* will be #5 on the list at best, and working
*efficiently* won't be anywhere near the list, or anywhere near the town
of Redmond for that matter.

--
Mike Smith
Jul 23 '05 #9

Mike Smith wrote:
puzzlecracker wrote:

IT IS NOT SO SIMPLE TO COME UP WITH EFFICIENT SOLUTION
Since when does Microsoft care about efficient solutions? The MS
interviewer will grade the solution based on:

1) whether it has a catchy, trademarkable name

2) whether you implemented a pop-up Clippy window to ask for help
running the program

3) how many service packs can be released for the program, and

whether or not MS might be able to charge for them

4) whether there are any ridiculously simple algorithms in the program that MS can patent, then use the patents to sue other companies

Actually working *at all* will be #5 on the list at best, and working *efficiently* won't be anywhere near the list, or anywhere near the town of Redmond for that matter.

--
Mike Smith


so much prejudice about microsoft. I know people that work there -
really top class in the field.... and they DO care about the
efficiency...

Jul 23 '05 #10
Mike Smith wrote:

puzzlecracker wrote:

IT IS NOT SO SIMPLE TO COME UP WITH EFFICIENT SOLUTION
Since when does Microsoft care about efficient solutions? The MS
interviewer will grade the solution based on:

1) whether it has a catchy, trademarkable name

2) whether you implemented a pop-up Clippy window to ask for help
running the program

3) how many service packs can be released for the program, and whether
or not MS might be able to charge for them

4) whether there are any ridiculously simple algorithms in the program
that MS can patent, then use the patents to sue other companies


:-)

5) can a COM object be made from it and how hard would it be to generate HTML
output from it.

6) How often during startup can the program emit the error: 'DLL not found'.

7) can gets() be used with it? (Important for opening the virus-loopholes)

8) How high is the potential for changing the GUI and nothing else in the next
few years, such that the whole thing can be sold again as the best since the
invention of the wheel.

9) Is it possible to integrate features that nobody asks for or needs.

10) Does it take more then 10 MB on the hard disk or in memory when loaded?

Actually working *at all* will be #5 on the list at best, and working ****

Make that number bigger. Much bigger!
*efficiently* won't be anywhere near the list, or anywhere near the town
of Redmond for that matter.


--
Karl Heinz Buchegger
kb******@gascad.at
Jul 23 '05 #11
puzzlecracker wrote:

so much prejudice about microsoft. I know people that work there -
really top class in the field.... and they DO care about the
efficiency...


Personally I believe, that most of the worst programmers on this
planet work for MS.

--
Karl Heinz Buchegger
kb******@gascad.at
Jul 23 '05 #12

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Oliver Drobnik | last post by:
Hi, I have a datagrid bound to a datatable. Now if I sort the datagrid by clicking on one of the column heads I can no longer use the index in the datagrid to find the corresponding row in the...
0
by: puzzlecracker | last post by:
Hi guys, These are some MS questions which i encountered in a recent interview. Hope it'll be helpfull to some of you. #1. Given an n X m grid of characters. You are supposed to search for a...
12
by: Jim H | last post by:
We ahve a .NET web page that we dynamically create a bunch of DataGrids and add them to a place holder. When the user hits submit we need to go through all of the DataGrids to get some data. We...
2
by: Leon | last post by:
Ok I have six textbox controls on my web-form that allows the user to enter the numbers 1-47 non-duplicates in each box ("meaning if the user enters 3 in one textbox they can't enter 3 in...
0
by: Matthew Louden | last post by:
I am trying to implement the sort event in data grid. I set the data grid's AllowSorting property = True. I implement the following code that should be the event will fire when the user click any...
9
by: tshad | last post by:
How do I find (and set) a couple of labels in the Footer after a DataGrid is filled? I have a bunch of DataGrids that get displayed nested inside a DataList. The datagrid looks like: ...
1
by: TG | last post by:
Is it possible to implement Find functionality in a Web Forms datagrid? If so, is there sample code I can look at? thanks tg
4
by: Aaron Smith | last post by:
Dim dv As DataView = New DataView(FacilitiesDS1.Facilities, "", "ID ASC", DataViewRowState.CurrentRows) Dim iPos As Integer = dv.Find(dr.Item("ID")) Me.BindingContext(FacilitiesDS1,...
1
by: Josh | last post by:
Using Visual Studio 2003, C#, .NET 1.1. I have a web form with a few textboxes, a couple of dropdown lists, and a data grid. The data grid is populated from a SQL stored procedure. The user...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.