6 kyu

Is a number prime?

1,079 of 116,937arithmetric
Description
Loading description...
Mathematics
Algorithms
  • Please sign in or sign up to leave a comment.
  • PNik1999 Avatar

    In "C++" While pushing "Attempt" -7 or -6 turns "false" in test, but it is "true" for -7 (it is a prime number) and "false" for -6 (not prime)

  • self-related Avatar

    This "too slow" condition is stupid as hell for 6 kyu. If the code works, it should be accepted.

  • Stefanstief74 Avatar

    That is now the 3rd KATA, where my Code works in VS, but in CW some tests fail. My code is in c#. With the same numbers, I get differents results in VS and CW!!!!

  • rafauke Avatar

    Thank you for the kata 🙏. Not sure if I like it very much though. It checks whether you know particular optimal methods for solving the challenge; solving the challenge is not enough :) Anyway, thanks!

  • Avgur161 Avatar

    Почему 75 является false, если оно делится на 5, 1, 75, 25 и соответвенно не является простым

  • Ham1et Avatar

    I get an error during the full check, even though the numbers that give an error are not prime and are also divisible by another number.

  • mac4685 Avatar

    Please show which number failed in the c++ section

  • drstitson Avatar

    The 'attempt' keeps timing out for me.

  • Jeki00 Avatar

    This comment has been hidden.

  • Asmox Avatar

    There is no feedback on which numbers the test is passing and for which one it's failing in C++

  • SubSlayer Avatar

    This comment has been hidden.

  • Gbruno27 Avatar

    This Kata doesn't work for Python. In the random tests it returns that the number 1492952653 isn't prime. Is it a fail in the Kata or in my Code?

  • ByteBandit73 Avatar

    C#. Why does "Attempt" time out? I extended the test script to include 30 of these:

    yield return new TestCaseData(Random.Shared.Next(1, int.MaxValue)).Returns(true);

    and multiple test runs completed in, and I quote:

    Time: 4756ms Passed: 6Failed: 30Exit Code: 1

    Time: 4578ms Passed: 6Failed: 30Exit Code: 1

    Time: 6446ms Passed: 8Failed: 28Exit Code: 1

    Time: 9301ms Passed: 9Failed: 27Exit Code: 1

    Time: 8725ms Passed: 9Failed: 27Exit Code: 1

    Time: 5229ms Passed: 7Failed: 29Exit Code: 1

    yet "Attempt" constantly times out at 12s. It seems like "Attempt" runs considerablly slower than merely testing.

    I will skip this kata :(

  • idjk Avatar

    In VS it works. But here no, i can't understand

  • AryanBabber Avatar

    This comment has been hidden.

  • RafaelDella Avatar

    This comment has been hidden.

  • user7578530 Avatar

    I am having some trouble while attempting here is the full digonostic:

    UndefinedBehaviorSanitizer:DEADLYSIGNAL ==1==ERROR: UndefinedBehaviorSanitizer: FPE on unknown address 0x0000004282b5 (pc 0x0000004282b5 bp 0x000000000000 sp 0x7fff12c7b420 T1) ==1==WARNING: invalid path to external symbolizer! ==1==WARNING: Failed to use and restart external symbolizer! #0 0x4282b4 (/workspace/test+0x4282b4) #1 0x42680e (/workspace/test+0x42680e) #2 0x4261dd (/workspace/test+0x4261dd) #3 0x425ecb (/workspace/test+0x425ecb) #4 0x42a8b5 (/workspace/test+0x42a8b5) #5 0x4256bd (/workspace/test+0x4256bd) #6 0x7fadcbda2c86 (/lib/x86_64-linux-gnu/libc.so.6+0x21c86) #7 0x4045f9 (/workspace/test+0x4045f9)

    UndefinedBehaviorSanitizer can not provide additional info. ==1==ABORTING

  • Grecks Avatar

    Anything related to trial division is just lame. :P

  • Amr Elnaggar  Avatar

    really intersting

  • ddstorted Avatar

    Loved it! Made me crack my brains for a good while as a beginner. Thanks :)

  • unlink.unperks Avatar

    This is a very interesting kata. There are trivial answers, and then there are very difficult (and more efficient) answers which could utilize advanced number theory and/or combinatorics. It's amazing just how difficult counting problems can actually be.

  • Erma-T Avatar

    this kata challenges more my code efficiency than the actual problem solving skill.

  • ajika Avatar

    Hello guys, to whom may have encoutered the execution time error. (Your codes take too much time to execute even though you solved the problem)

    This made me come to realize that this platform codewars isn't about statistics or proving how master you are in coding. it's about learning and improving your programming skill. Therefore, It all comes down to "algorithm", the first 15 minute of this video https://www.youtube.com/watch?v=8hly31xKli0 will blow your mind.

  • TurbulentTomato Avatar

    it keeps saying timed out. -_- i am new can someone help me

  • Fridolinx Avatar

    This comment has been hidden.

  • KS-SenkuFan Avatar

    Hey , having issues with increasing efficiency to avoid a timeout error . Could I do so while still using list comprehension ? I tried converting to a generator but it doesnt seem to fix the issue . Any tips? this happens with a few of my programs

  • The Rizzler Avatar

    This is a good challenge but I don't like getting punished for solving the problem the "wrong" way. The server timeout for basic code like this is frustrating but did cause me to re-think.

  • PawelKinczyk Avatar

    Hi, how can i optimize the performacje in c#?

  • Gutter Avatar

    maybe it is intended but in R the function name that is writen in draft, is not what test calls.

  • DmitryKRTV Avatar

    You should write about performance requirement at the very top of your kata

  • pezgordo Avatar

    This comment has been hidden.

  • krishna4157 Avatar

    Why it is passing basic testcases and faiiling random due to timeout, even there is noo big loops going on. please let me know what is the issue

  • MihaiS7 Avatar

    was a very good kata, would be helpful more kata like this where you need to find a better way for increasing the time speed of your algorithm.

  • denismart Avatar

    This comment has been hidden.

  • Zebra41 Avatar

    This comment has been hidden.

  • WiseStory Avatar

    This comment has been hidden.

  • user1570986 Avatar

    This comment has been hidden.

  • vinc3w Avatar

    I feel like this kata should be 5 kyu. Haha

  • MoBlack Avatar

    This comment has been hidden.

  • dekaratas Avatar

    I think I misunderstood the description. Assumed looping was generally prohibited so I gave up. Alas, should've given it a shot regardless.

  • Ilham302 Avatar

    This comment has been hidden.

  • avichii Avatar

    had fun, I was a bit stuck on optimization but, found out a way that is not my usual brute force :) .

  • MilanGrujicic Avatar

    This comment has been hidden.

  • JuanDeDironne Avatar

    This comment has been hidden.

  • Bigoh20 Avatar

    This took longer than expected

  • matiz327@wp.pl Avatar

    Can i speed up a algoritm when i use int.MaxValue and i had only 5,1 sec? but here i have always more than 12 sec?

  • leckomio Avatar

    I also have that issue with that runtime over 1200ms.

    By the way, the times presented at testresult are incorrect, on top it says 502ms and below it says 0.5ms.

  • matiz327@wp.pl Avatar

    This comment has been hidden.

  • AndresRoc Avatar

    This comment has been hidden.

  • JoyalGeorgeKJ Avatar

    This comment has been hidden.

  • karpusharu Avatar

    This comment has been hidden.

  • Kel26N Avatar

    This comment has been hidden.

  • Fortvile Avatar

    This comment has been hidden.

  • devs-toni Avatar

    This comment has been hidden.

  • TeriJacobs Avatar

    This comment has been hidden.

  • traverpirog Avatar

    Why -5 is not prime number?

  • Kirik1103 Avatar

    What is this Random tests? I tried 2 options of solving and only Random tests is failing. Why? What kind of tests are there?

  • SerdarMut Avatar

    This comment has been hidden.

  • Moroccan-Ghost Avatar

    This comment has been hidden.

  • Woldemort Avatar

    This comment has been hidden.

  • Khama Pande Avatar

    I passed all the test!! Alas!! I'm getting timed out(16000ms) while submission

  • flooijdt Avatar

    With Rust I get a timeout out of a "tests::random_tests". Unfortunately, the test is not provided.

  • benjthompson Avatar

    Java submission test includes a failing test for -2147483647, which should not be prime, and my function does not mark it prime as far as I can tell. If I write this condition into the tests manually it succeeds.

  • FlyingPhelddagrif Avatar

    My suggestion for anyone having issues is to read the whole question. Especially the part where it says there is a number in the test designed to time you out with simpler solutions.

  • curryyyyy Avatar

    This comment has been hidden.

  • araujo911 Avatar

    This comment has been hidden.

  • MrPotatsus Avatar

    This comment has been hidden.

  • IvoHD Avatar

    solving in C#, only random test is failing, does the test maybe have an error?

  • dopecello Avatar

    I passed all the tests and my code timed out when it was time to submit... smh

  • MarkSSh Avatar

    Execution timed out, g++ and tests works perfectly even with 9 digit numbers

  • solDC Avatar

    This comment has been hidden.

  • AliLtRP Avatar

    the performance was lateing me.

  • Y1em Avatar

    This comment has been hidden.

  • Yosriford Avatar

    YES THAT'S THE PROBLEM!! RANDOM TEST are really big numbers XD Incorrect answer for n=1423176763: False should equal True Incorrect answer for n=1108179043: False should equal True Incorrect answer for n=1239667097: False should equal True

  • Yosriford Avatar

    there's some issues with this kata : 1/ prime numbers can be negative 2/ the random test is obviously giving big numbers that makes the compilation time out

  • Glenn0-0 Avatar
  • haugstve Avatar

    Maybe just remove this Kata? In Python the tests are stating that -5 and -41 are not prime. That's not correct.

    I know that the definition they teach this is something like this: A prime is a positive integer p>1 that has no positive integer divisors other than 1 and p itself.

    Negative numbers are excluded. In fact, they are given no thought. Wikipedia does the same. Notice how it's not mentioned that no negative number is a prime on the wiki page. It's simpler and for most purposes not addressing it works.

    Now if you actually want to check if a negative number is a prime you should extend the definition to handle negative numbers.

    https://en.wikipedia.org/wiki/Prime_number#Prime_elements_in_rings https://math.stackexchange.com/questions/1002459/do-we-have-negative-prime-numbers

  • akar-0 Avatar
  • The-eye-of-Ar3s Avatar

    Python test is broken: Traceback (most recent call last): File "/workspace/default/tests.py", line 3, in @Test.describe("Basic") NameError: name 'Test' is not defined. Did you mean: 'test'?

  • delsix Avatar

    This comment has been hidden.

  • jab2ez Avatar

    This comment has been hidden.

  • datachap Avatar

    This comment has been hidden.

  • oumao Avatar

    This comment has been hidden.

  • AmneZIAAR-- Avatar

    There is a problem with the -1 test when I run the code. On vscode all the tests work including the -1 except when I want to submit the code to validate the solution. Weird.

  • akar-0 Avatar

    R: bad function name in solution set up: prime_list should be is_prime.

  • JohanWiltink Avatar

    LC translation

    ( This translation modifies the description. )

  • MBasala Avatar

    I am failing for returning false on if 12 is a prime number.

  • Alexfit4 Avatar

    This comment has been hidden.

  • jufrix Avatar

    This comment has been hidden.

  • dag_weg Avatar

    When I test my code I pass but when I Attempt I fail, I'm just gonna assume the compiler doesn't work

  • Ev4n Avatar

    So, this is saying that my code is wrong because -5 ins't a prie number, but it is or am I dumb?

  • Laveesh Tomar Avatar

    This comment has been hidden.

  • bener07 Avatar

    Did anyone attempt the code successfuly ??

  • usermxi Avatar

    After you finish the kata, try this for fun Test number 12314567201 (prime) Test number 50991113171 (prime) Test number 50991113171 * 12314567201 (not prime) The last one takes forever to check. If you can find efficent method to solve the problem, post on a math forum to collect Nobel Prize

  • yiushing123 Avatar

    This comment has been hidden.

  • Enazarov Rustam Avatar

    Guys what does is mean?

    True should equal False None should equal False

    My code only accepts 'int' type, in other case it would return False

  • remylekrene Avatar

    ok, mathematitians have been trying to solve this problem for 2000 years, and I have to do it with c++

  • Mostafa-sys Avatar

    This comment has been hidden.

  • Rovshen Avatar

    This comment has been hidden.

  • burcev-alex Avatar

    "testRandom . Failed asserting that true matches expected false." , - How to pass this test?

  • m7mdmorsi Avatar

    Im timing out with close to maximum efficiency solution lol

  • Trikid12 Avatar

    Is there someone who was able to attempt the Kata?

  • serjslastnikov Avatar

    This comment has been hidden.

  • Kayden99 Avatar

    This comment has been hidden.

  • bener07 Avatar

    I'm having the timeout error too. The code is right but it gives me a timeout😐

  • juliaguida Avatar

    Finally all tests passed.

  • juliaguida Avatar

    Yes am getting this timeout error too

  • 0racul Avatar

    This kata has nothing to do with programming and code. The correct solution is to be found in math area and math area alone. Useless as >programming< task

  • oRauu Avatar

    I have a time error with my code, but when i use it in pycharm with timer - it take almost zero time, cant understand what problem is, it work also even on a big numbers

  • gustavosantaella Avatar

    Wouldn't it be better to make a recursive call that evaluates 3 times and if counter = 2 returns true instead of looping through n numbers?

  • rodolfomoraes Avatar

    My solution is giving an error in the random test, but I can't understand how this test was done on top of my code.

  • Enum0x539 Avatar

    This comment has been hidden.

  • jubnl Avatar

    This comment has been hidden.

  • Atvvd Avatar

    How to avoid overtime? What if it's just the square of the prime in the range?

  • mrBlackHat777 Avatar

    This comment has been hidden.

  • catherinen Avatar

    This comment has been hidden.

  • helpmeiamdying Avatar

    This comment has been hidden.

  • spellmell Avatar

    This comment has been hidden.

  • SweeftyZz Avatar

    This comment has been hidden.

  • hamzayousfi Avatar

    Very Good Kata ! i like it !!

  • Flaviodc7 Avatar

    This comment has been hidden.

  • zaboucool Avatar

    This comment has been hidden.

  • eneamuskaj Avatar

    This comment has been hidden.

  • Alexander Rakhmanov Avatar

    This comment has been hidden.

  • danydin5 Avatar

    This comment has been hidden.

  • Dacops Avatar

    This comment has been hidden.

  • xFRAZERx Avatar

    This comment has been hidden.

  • mya-engineer Avatar

    This comment has been hidden.

  • organicsagwa Avatar

    여기에 한국 성님들없나요? 개어려움 좀 가르쳐주셈.. 뉴비한테 코드최적화 넘 어려운거 아님? 아니 이건 수학을 잘해야하는 거임? 아니면 알고리즘 사고 방식이 잘못된거임???? 둘 다 못하는데 어떡하라는 겁니까 ㅠㅠ

  • mya-engineer Avatar

    This comment has been hidden.

  • jesscasey Avatar

    This comment has been hidden.

  • 2007133 Avatar

    This comment has been hidden.

  • akar-0 Avatar
  • akhilbisht203 Avatar

    This comment has been hidden.

  • Fokderio Avatar

    This comment has been hidden.

  • CocaFlores Avatar

    This comment has been hidden.

  • technophile Avatar

    Well, as a newbie who spent seven hours on this problem and later found it out, here are some tips for those who pass their basic tests, but fail in attempt (Execution Timed Out: 12000/16000 MS).

    1. Don't use for loops. Isn't there another way?
    2. Don't copy code. Those code don't work. Especially from GeeksforGeeks.
    3. ONLY USE WHILE LOOP/S AND IF STATEMENTS.

    Good Luck. Even if you copy the right code, please understand the computational logic behind it. Thanks.

  • general_disarray Avatar

    This comment has been hidden.

  • IvanThatIsNotAlreadyTaken Avatar

    I am interesting whether anyone did this through elliptic curves? I was too lazy for something like that.

  • aburto22 Avatar

    Hi guys, I struggled with this problem because it timed out every time until I found the solution.

    There are several ways to find the prime numbers, but if you want to pass the time out issue focus on this 2 things:

    1. Until which number do you need to loop to? Is it n, .... ?
    2. By how many units do you need to increment your loop index? Can you increase this number?

    Good luck!

  • ileef Avatar

    This comment has been hidden.

  • user9313954 Avatar

    Interesting way to prevent us from making unneficient code xD Nice kata :)

  • Donner Avatar

    This comment has been hidden.

  • rawi2001 Avatar

    this kata deserve to be deleted ! its attempt in js is irrelevant after all optimization it gives run out- its written that it might do this but still you cant know in attemp if the code is right! didnt like it

  • SoraZora1112 Avatar

    Is it normal for code to work perfectly in ide on my pc but not in the kata? it keeps saying 3 & 5 return false. Tried it myself in codeblocks and it worked just fine. bothe return true.

  • gabe boston Avatar

    Execution Timed Out everytime after testing

  • Vincemend Avatar

    This comment has been hidden.

  • MikeBurton89 Avatar

    Well, my algorithm works but it times out. Am I doing anything wrong?

  • Naa_gh Avatar

    This comment has been hidden.

  • KishiKyle Avatar

    I think this Kata requires knowledge of primes that is not relevant to learning computer algorithms.

  • ChikakararaCoder Avatar

    This is what I get when I click Test Test Results: PrimeTest testNotPrime testBasic testPrime Completed in 13ms You have passed all of the tests! :)

    but when I click attempt I get : Execution Timed Out (16000 ms)

  • Patrick Troll90 Avatar

    I am able to make the test pass for is prime. I am also able to make it pass for is not prime based on the boolean value I pass into my conditional. But if I try using a else if check or a second if conditional to check the result I can't do both. So...I am guessing because I use a return statement I am exiting ealry or something maybe. Still not figued it out.

  • Danil Tolmachov Avatar

    I think this is too difficult for 6kyu, rather closer to 4kyu.

  • web.borisoff Avatar

    Very interesting kata! Thanks!

  • saltsphinx Avatar

    It would be really nice if a hint on what to research was given. Im passing the test but fail the random one. Also, how do I see the parameters that fail? Am I not supposed to know what fails the test...

  • Stero Avatar

    This comment has been hidden.

  • wspk Avatar

    Everyone in the comments seems to agree that negative numbers aren't prime. The definition given in the description: "Per Wikipedia, a prime number (or a prime) is a natural number greater than 1 that has no positive divisors other than 1 and itself." Is valid for negative numbers (e.g. -5 has divisors: 1, 5, -1, -5 i.e. the only positive divisors are 1 and itself), I think the language "positive divisors" makes it clear they're considering negative numbers here.

    Regardless of what common usage is, I think the definition should match the test cases. Clarifying the definition would be an easy fix.

  • etheriousnoob Avatar

    my test output is showing weird errors it says 75 not prime:true should equal false 4 not prime : true should equal false.this also happened for other numbers like 6 and 8...i mean 4,6,8and 75 are definitely not prime numbers pls fix this

  • Mixer-X Avatar

    После того, как решил задачу по зеленной кнопке, дальше переходить к другой? Или ещё чего нажимать надо для учета решения?

  • Christian-Nerd Avatar

    This comment has been hidden.

  • CrashOverride1987 Avatar

    This comment has been hidden.

  • Christian-Nerd Avatar

    This comment has been hidden.

  • krish4n Avatar

    This comment has been hidden.

  • Mixer-X Avatar

    Если на тест рандом не хватает времени, что это значит? Задача зачтена, или надо придумывать что-то пошустрее?

  • emiliokariuki Avatar

    the compiler timed out after having passed the first test and it needed me to optimize my code

  • DCommK Avatar

    Any R coder that uses return() at the end of their function should automatically fail the test.

  • tomster1996 Avatar

    This comment has been hidden.

  • elfy941 Avatar

    How many numbers are there in the test set ? My solution timed out after checking 261 numbers :))

  • xxgbzxx Avatar

    for those who passing the test, but fail at attempt. The num you will be attempting against is huge, so try to do something about that before running your loop checks.

  • deletedaccount Avatar

    im passing all the test, but my test result is always: Execution Timed Out

  • vesperbot Avatar

    A hint: there are at least two functions available from importable modules that you can use directly.

  • Florian-Voss Avatar

    This comment has been hidden.

  • t-buss Avatar

    This comment has been hidden.

  • rtrauben Avatar

    I special cased the loop increment to 2 after a threshold and doubled the number of random number evaluations from 30 to 60 but still times out.

    Looking at primes from 1..100 shows 25 primes with prime gap deltas of 2,4,6,8. I am not sure how to be systematic in this effort. Is there a paper someone can direct me to?

    Richard This is approximately logarithmic?

  • rtrauben Avatar

    My solutions either run into memset (bool) space or runtime exceeded. The straightforward wiki dfn causes runtime exceeded (attached below).

    My for loop upper bound increment is i++. Maybe it can be dynamically trimmed to avoid visiting multiples of existing primes?

    **Is that the right direction towards a solution? **

    Random_Test

    1 num:876527174 .. is not prime! 21 num:1577810551 .. is not prime!
    2 num:1644030750 .. is not prime! 22 num:1266333403 .. is not prime!
    3 num:1393969603 .. is not prime! 23 num:2132127515 .. is not prime!
    4 num:1335491684 .. is not prime! 24 num:1281074547 .. is not prime!
    5 num:1929713169 .. is not prime! 25 num:90046948 .. is not prime!
    6 num:24193965 .. is not prime! 26 num:2068897426 .. is not prime!
    7 num:49651675 .. is not prime! 27 num:1737718634 .. is not prime!
    8 num:218588094 .. is not prime! 28 num:714922702 .. is not prime!
    9 num:356028242 .. is not prime! 29 num:162692740 .. is not prime!
    10 num:877418047 .. is not prime! 30 num:587217759 .. is not prime!
    11 num:901310737 .. is not prime! 31 num:869667984 .. is not prime!
    12 num:1107801141 .. is not prime! 32 num:1039219915 .. is not prime!
    13 num:2099772465 .. is not prime! 33 num:83764861.. IS prime!
    14 num:993022361 .. is not prime! 34 num:116153939 .. is not prime!
    15 num:503688437 .. is not prime! 35 num:227227951 .. is not prime!
    16 num:735156648 .. is not prime!
    17 num:1089112823.. IS prime!
    18 num:914354483 .. is not prime!
    19 num:390465283 .. is not prime! STDERR
    20 num:1819589577 .. is not prime! Execution Timed Out (12000 ms)

  • ymralin Avatar

    My code passes the test, but it times out when i try to send it. I don''t know how to measure how long it takes in my IDE to run it, but it looks like it works instantaneously. I just pasted 15-digit square number into sample test, it completed in 7402ms. What is in the main test if 12000ms is not enough time?

  • theonlyposi Avatar

    This comment has been hidden.

  • theonlyposi Avatar

    This comment has been hidden.

  • Faiza Tanveer Avatar

    Your solution returned that -5 is prime, but it's not this is the error i am reciving but -5 is prime number.The test should expect a true result.

  • andTutin Avatar

    "There are no fancy optimizations required"

    LIE

  • jameson_larsen Avatar

    On C++, I pass all tests but I fail whenever I attempt it. The test I fail says that it is expecting true, but my function returns false. However when I log the number that I am failing on it says that it is 12, which is obviously not prime, so shouldn't a return of false be correct? Any suggestions?

  • murat-es Avatar

    This comment has been hidden.

  • klee082 Avatar

    This comment has been hidden.

  • mdrei4-1 Avatar

    I'm passing all the test cases, but when I go to click Attempt I get this error I've never seen before. Anybody have any idea what I might be doing wrong? (This is in C++ btw.)

    UndefinedBehaviorSanitizer:DEADLYSIGNAL ==1==ERROR: UndefinedBehaviorSanitizer: FPE on unknown address 0x000000427e77 (pc 0x000000427e77 bp 0x7ffe78df1c10 sp 0x7ffe78df1750 T1) ==1==WARNING: invalid path to external symbolizer! ==1==WARNING: Failed to use and restart external symbolizer! #0 0x427e76 (/workspace/test+0x427e76) #1 0x42672e (/workspace/test+0x42672e) #2 0x4260fd (/workspace/test+0x4260fd) #3 0x425deb (/workspace/test+0x425deb) #4 0x42a8f5 (/workspace/test+0x42a8f5) #5 0x4255dd (/workspace/test+0x4255dd) #6 0x7f0401267bf6 (/lib/x86_64-linux-gnu/libc.so.6+0x21bf6) #7 0x404529 (/workspace/test+0x404529)

    UndefinedBehaviorSanitizer can not provide additional info. ==1==ABORTING

  • nsigal Avatar

    This comment has been hidden.

  • @68656c6d Avatar

    This comment has been hidden.

  • Litusiano Avatar

    This comment has been hidden.

  • marques06 Avatar

    in the test my program takes 0.28ms but when i try to send it appears "Execution Timed Out (12000 ms)". Why is this happening ?. I have no idea how to further optimize my code ...

  • B1ts Avatar
  • jrawatRepo Avatar

    Able to run same solution in my local with 0.82s but submitting get execution timeout error ??

  • konstantink1 Avatar

    For some reason when I run my code for Tests it works well and it passes all tests in ~1600ms, but I get the following error when I click on attempt:

    "FATAL ERROR: CALL_AND_RETRY_LAST Allocation failed - JavaScript heap out of memory"

    I'm using JS as my language. Have anyone faced this issue and what it really means? When I was doing some testing on Codepen during development it all worked well for me as well.

  • mikeCere Avatar

    This comment has been hidden.

  • caroline_pola Avatar

    This comment has been hidden.

  • komodoensis Avatar

    This comment has been hidden.

  • Alfonj17 Avatar

    This comment has been hidden.

  • Alfonj17 Avatar

    This comment has been hidden.

  • Ojka91 Avatar

    This comment has been hidden.