facing problem while submitting solutions

All general topics that Dev Skill members should discuss.

facing problem while submitting solutions

by arabin » Sat Aug 06, 2016 11:09 pm

i have solved the problem palindrome using java. but while i have submitted my solution it shows time limit exceeded. i have also solve many other problems but it also shows runtime exceptions. i am giving my code below tell me where is the problem

Code: Select all
public static void main(String[] args) {
      Scanner kbScanner = new Scanner(System.in);
      //System.out.print("Enter test Case :");
      int test = kbScanner.nextInt();
      String []input = new String[test];
                int maxid = -1;
                int a = 1;
      for(int i = 1; i<=test; i++){
         input [++maxid] = comparision(kbScanner.next());
                for (String string : input) {
   private static String comparision(String next) {
      // TODO Auto-generated method stub
      String ss = "";
      for (int i = next.length()-1; i >=0 ; i--) {
         ss += next.substring(i, i+1);
                if (next.equalsIgnoreCase(ss)) {
                return "yes";
                    return "no";
Posts: 28
Joined: Sat Aug 06, 2016 11:02 pm

Re: facing problem while submitting solutions

by devskill » Sun Aug 07, 2016 7:22 am

We have investigated your case and increase time limit of the problem for Java/C#/PHP. Thank you for reporting the issue. Please always inform us if you find time issue with these languages. We always want that our problems are solvable using other languages, that is why we put different time limit feature for our problems.

Btw, your code is not fully correct. You may now get Wrong Answer unless you correct your code. Please read I/O specification carefully.
User avatar
Site Admin
Posts: 118
Joined: Tue Feb 02, 2016 10:24 pm

Who is online
Users browsing this forum: No registered users and 0 guests