1 Replies - 221 Views - Last Post: 25 January 2013 - 08:05 PM Rate Topic: -----

#1 robinruet  Icon User is offline

  • New D.I.C Head

Reputation: -1
  • View blog
  • Posts: 18
  • Joined: 11-September 11

FaceBook Hacker Cup Balanced Smiley Problem

Posted 25 January 2013 - 08:02 PM

Hi, I am working on 2nd solution.
I have made this code.
http://pastebin.com/PD0JPeDf

Problem Link : http://www.facebook....185564241586420

I am bit confused about the problem and that is

They said
A message has balanced parentheses if it consists of one of the following:

- An empty string ""
- One or more of the following characters: 'a' to 'z', ' ' (a space) or ':' (a colon)
- An open parenthesis '(', followed by a message with balanced parentheses, followed by a close parenthesis ')'.
- A message with balanced parentheses followed by another message with balanced parentheses.
- A smiley face ":)" or a frowny face ":("


SO if any of those statement is true, It will be balanced.

But they said :(( is not balanced, but is satisfy the last term. So why it is not balanced?

Is This A Good Question/Topic? 0
  • +

Replies To: FaceBook Hacker Cup Balanced Smiley Problem

#2 macosxnerd101  Icon User is offline

  • Self-Trained Economist
  • member icon




Reputation: 10486
  • View blog
  • Posts: 38,858
  • Joined: 27-December 08

Re: FaceBook Hacker Cup Balanced Smiley Problem

Posted 25 January 2013 - 08:05 PM

We're not helping you cheat in a programming competition. If you can't write the code, you don't deserve to win or advance.
Was This Post Helpful? 1
  • +
  • -

Page 1 of 1