Skip to content

Code Says

C code. C code run. Run code run… please!

  • Home
  • Cracking the Coding Interview
  • Codility
  • Jobdu OJ
  • LeetCode
  • Privacy Policy
  • Contact Me

Tag Archives: rotation

Solution to lithium2013 (Clocks) by codility

2 Feb

Question: https://codility.com/demo/take-sample-test/clocks Question Name: lithium2013 or Clocks At the very beginning, I found this task is very similar with the string rotation question in CTCI. And I did transfer this question into a string rotation one. The string rotation solution … Read More »

Codility, Python codility, LMR, python, rotation Leave a comment

Guideline for Comments

tl;dr: Please put your code into a <pre>YOUR CODE</pre> section.

Hello everyone!

If you want to ask a question about the solution. DO READ the post and comments firstly.

If you had some troubles in debugging your solution, please try to ask for help on StackOverflow, instead of here.

If you want to post some comments with code or symbol, here is the guidline.

1. To post your code, please add the code inside a <pre> </pre> section (preferred), or <code> </code>. And inside the pre or code section, you do not need to escape < > and &, e.g. no need to use &lt; instead of <.

2. To use special symbols < and > outside the pre block, please use "&lt;" and "&gt;" instead.

3. If you have a comment with lots of < and >, you could add the major part of your comment into a <pre class="decode:true crayon-inline "> YOUR COMMENTS </pre> section.

Finally, if you are posting the first comment here, it usually needs moderation. Please be patient and stay tuned. Thanks!

CodeSays.com Admin

Recent Comments

  • raul April 28, 2022 at 8:50 am on Solution to Genomic-Range-Query by codilityHi Sheng, i've made a similar code, that got 100/100 as well an it ilustrates pretty well what you're trying to say: def solution(S, P,...
  • raul April 27, 2022 at 9:06 am on Solution to Count-Div by codilitySorry, on (B-A)/K or (B-(A – A%K))/K + 1 it should've been (B-(A – A%K))/K or (B-A)/K + 1
  • raul April 27, 2022 at 9:00 am on Solution to Count-Div by codilityI don't think that anyone will be able to give you a more complete answer then Rachel did, although I'll try to make it simpler:...
  • raul April 25, 2022 at 10:49 pm on Solution to Perm-Check by codilityMy 100% solution using python: def solution(A): i = 0 xor = 0 for n in A: i += 1 xor ^= i ^ n...
  • raul April 25, 2022 at 10:27 pm on Solution to Frog-River-One by codilityVery interesting approach. Haven't tried in Java, although, I've recreated the same logic using python and it works wonders. If anyone's curious, the python code...
  • raul April 25, 2022 at 10:16 pm on Solution to Frog-River-One by codilitySorry guys, i tried to make the code look more pleasent before posting here, but even trying to use the same principle to solve in...
  • raul April 25, 2022 at 9:51 pm on Solution to Frog-River-One by codilityAnother 100/100 aproach in python: def solution(X, A): x = list(range(1, X + 1)) sum_x = sum(x) i = -1 while(len(A) > 0 and sum_x...
  • Raul April 18, 2022 at 1:59 pm on Solution to Perm-Missing-Elem by codilityI made it like this: def solution(A): if A == []: return 1 A = sorted(A) s = ((len(A) + 1) * ((len(A) + 1)...
  • Sheng April 15, 2022 at 9:26 pm on Solution to Tie-Ropes by codilityPlease re-read the question: given an integer K and a non-empty array A of N integers, returns the maximum number of ropes of length greater...

Categories

  • Announcement
  • C/C++
  • Codility
  • Interview Questions
  • Java
  • Jobdu OJ
  • LeetCode
  • Linux
  • Others
  • Python
  • Solutions-CTCI
  • SQL

Tags

algorithm AppFog C codility Crawler CTCI Hash Set Interview Linux LMR pcapy PHP python rotation shuffle Utility WordPress

Meta

  • Log in
  • Entries feed
  • Comments feed
  • WordPress.org
© 2022 Code Says
Powered by WordPress / Theme by Design Lab
  • Contact Me
  • About Me
  • Privacy Policy