Results 1 to 3 of 3
  1. #1
    ssk2659 is offline Member
    Join Date
    Jan 2015
    Rep Power

    Default Finding a cell on Edge

    Hey! For my project I have to write a piece of code where it returns true or false value depending whether the indicated cell is on edge of a rectangular grid (true) or not (false). Could smb please explain an algorithm for the following method: public static boolean onEdge (int n, int numRows, int numCols)?? To highlight, numRows and numCols and n start from 0. Thanks in advance!

  2. #2
    DarrylBurke's Avatar
    DarrylBurke is offline Forum Police
    Join Date
    Sep 2008
    Madgaon, Goa, India
    Rep Power

    Default Re: Finding a cell on Edge

    If you're forever cleaning cobwebs, it's time to get rid of the spiders.

  3. #3
    gimbal2 is offline Just a guy
    Join Date
    Jun 2013
    Rep Power

    Default Re: Finding a cell on Edge

    As per usual, draw a grid on a piece of paper and draw the coordinates of the cells. Then look at what coordinates make up the edges to try and see a pattern in there. Then use that pattern in your code.
    "Syntactic sugar causes cancer of the semicolon." -- Alan Perlis

Similar Threads

  1. Blue Mind Edge 2013-03-13
    By java software in forum Java Software
    Replies: 0
    Last Post: 03-18-2013, 02:23 AM
  2. read excel cell value using cell id or name
    By Ambika in forum Apache POI
    Replies: 0
    Last Post: 02-22-2013, 12:01 PM
  3. Canny Edge Detection
    By tiny in forum Advanced Java
    Replies: 4
    Last Post: 03-16-2011, 04:54 PM
  4. Image Matching Using Edge Detection
    By krishnanrocks87 in forum Java 2D
    Replies: 0
    Last Post: 02-22-2011, 05:39 AM
  5. Edge detector
    By ranwolf in forum SWT / JFace
    Replies: 9
    Last Post: 09-11-2008, 01:42 PM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts