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

This is a discussion on Find the biggest rectangular area consisting only of 2 types of letter within the C++ Programming forums, part of the General Programming Boards category; I need help with a problem. Given a MxN board represented with M letters (a, z) in each of the ...

  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
    2,391
    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, 09:40 AM
  2. help using strings and mapping
    By trprince in forum C Programming
    Replies: 29
    Last Post: 12-01-2007, 03: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, 07:50 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21