Thread: Find the biggest rectangular area consisting only of 2 types of letter

  1. #1
    Registered User
    Join Date
    Feb 2009
    Posts
    17

    Find the biggest rectangular area consisting only of 2 types of letter

    I need help with a problem.

    Given a MxN board represented with M letters (a, z) in each of the N lines, i have to find the biggest area in which there are only 2 types of letters in it. The area must have rectangular shape. Here's an example :

    Code:
    4 4
    AAAA
    ABBC
    BBCA
    DCAA
    The output will be 6, because the biggest rectangular area in which there are only 2 types of letters is in the upper corner AAA-ABB, there are only A and B (2 types).

    Please help me, it's urgent.

    Thank you in advance.

  2. #2
    Registered User
    Join Date
    Oct 2006
    Posts
    3,445
    first of all, read our homework policy.

    then, post the code you have already written.
    if you haven't written any code yet, get started.

    we can't help you if we don't know where you're stuck.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. How do I ...
    By geekrockergal in forum C Programming
    Replies: 21
    Last Post: 02-07-2009, 10:40 AM
  2. help using strings and mapping
    By trprince in forum C Programming
    Replies: 29
    Last Post: 12-01-2007, 04:01 PM
  3. The Interactive Animation - my first released C program
    By ulillillia in forum A Brief History of Cprogramming.com
    Replies: 48
    Last Post: 05-10-2007, 02:25 AM
  4. Whats wrong with my find Circle Area program?[compiles fine]
    By Golden Bunny in forum C++ Programming
    Replies: 22
    Last Post: 06-16-2002, 02:49 PM
  5. Won't Return pointer, i can't find why...
    By ss3x in forum C++ Programming
    Replies: 2
    Last Post: 02-28-2002, 08:50 PM