TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Chetan Malhotra
NA
23
6.7k
Searching in 2D Grid(c++)
Jun 23 2016 4:21 PM
Please take a look: http://www.geeksforgeeks.org/search-a-word-in-a-2d-grid-of-characters/
This is a C++ program that searches a 2D grid for a particular word.
In, the code, there are two declarations:
int x[]={-1,-1,-1,0,0,1,1,1};
int y[]={-1,0,1,-1,1,-1,0,1};
Can anyone please explain these?? The author says these are for searching in all the 8 directions. But i am not getting how??
Reply
Answers (
1
)
How to Read and Write Collections custom types to file with custom file extension
Passing a pointer to an array to an external function