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 7850187
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T18:46:39+00:00 2026-06-02T18:46:39+00:00

I am a Java programmer. I find that many times even if my algorithm

  • 0

I am a Java programmer. I find that many times even if my algorithm is correct, I get a Time Limit Exceeded on my submissions with codechef. Are there some techniques that one should employ while submitting solutions in Java in programming contests?

  • 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-06-02T18:46:40+00:00Added an answer on June 2, 2026 at 6:46 pm

    On CodeChef, all submissions in Java have 2x of the time limit than their native language (eg, c/c++/pascal) counterpart. However, one thing that goes unmentioned is that the Judge starts behaving very slowly when the memory consumption goes high which happens quite often with Java solutions. The CodeChef judge runs with a memory setting of 64 MB for all Java programs. You should try and use as less memory as possible and try and run the same solution locally with -Xms = 64 MB.

    The increased time limit can also be caused by the fact that when program’s memory usage draws near to allowed maximum (which is 64 MB in this case), then the JVM invokes the garbage collector which uses CPU very intensively and hence delays the program execution.

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

Sidebar

Related Questions

I am a Java programmer who learns Haskell. I've written a small program that
I am a java programmer, I found that Java is very good at doing
I am an experienced C++ programmer but new to Java. I have an algorithm
I know that even a question Erlang or Java seems quite strange, because they
I'm a pretty experienced Java programmer that's been doing quite a bit of Win32
Every time I look at some Java source code, I find myself surfing in
I'm writing a chess programm in Java with Chesspresso. Unfortunately, I did not find
I'm a longtime Java programmer working on a PHP project, and I'm trying to
I'm a Java programmer, and I like my compiler, static analysis tools and unit
I am a Java programmer and need to work on a Flex/ActionScript project right

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.