Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7641251
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T08:52:34+00:00 2026-05-31T08:52:34+00:00

A question about interview street input constraints. (http://interviewstreet.com/) Is it necessary to check the

  • 0

A question about interview street input constraints. (http://interviewstreet.com/)

Is it necessary to check the inputs for errors in the interviewstreet challenges?
For example, one challenge details the following constraints for the STDIN content:

1 <= N <= 1,00,000(10^5)
1 <= K <= N
0 <= profit value of any billboard <= 2,000,000,000(2*10^9)

Do I have to write some code to check the values to make sure that they meet these constraints or can I just assume that they do.

Also, if I do have to write the code to check what do I output if the inputs are incorrect?

Thanks

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-31T08:52:35+00:00Added an answer on May 31, 2026 at 8:52 am

    You can take it for graneted that inputs will always be adhering to the given constraints.
    You don’t need write any extra code for checking if input is within given constraints.
    So if they say N will be <= 1,00,000, you can use an array of exactly 1,00,000 to store the elements and you’ll be fine.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I was reading about this person's interview at a well-known search company. http://asserttrue.blogspot.com/2009/05/one-of-toughest-job-interview-questions.html He
This is an interview question I saw from here: http://www.careercup.com/question?id=1707701 Want to know more
I got this in an interview question -- the question was more about what
This is an interview question, and should concern about efficiency. How to calculate occurrences
In an interview I was asked a question that I'd never thought about, which
Afer reading this topic C++ interview preparation (Matt's answer) I've got a question about
I have just finished a technical interview. The interviewer asked a question about the
I have been asked a question in an interview about interfaces. I am not
Unusual interview question I got. Being completely agnostic about the platform, what are some
I was recently asked a question, apparently in an Interview, about extending the java.lang.RuntimeException.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.