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
  • 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

  • parikshit verma July 5, 2023 at 8:26 am on Solution to Missing-Integer by codility def missingnum(a): st=min(a) en=max(a) b=set(range(1,en+2)) if (en<1 or st>1) : return 1 else: return min(b-set(a))
  • Pavankumar Nandeshwar June 26, 2023 at 8:07 am on Solution to Dwarfs-Rafting by codilityOk fixed it. gives 100%: int solution(int N, string &S, string &T) { int q = N / 2 * N / 2; int lf...
  • Pavankumar Nandeshwar June 26, 2023 at 5:23 am on Solution to Dwarfs-Rafting by codilityCan someone explain what is wrong with my solution in C++ ? int solution(int N, string &S, string &T) { int q = N /...
  • Pavankumar Nandeshwar June 23, 2023 at 10:25 pm on Solution to Flood-Depth by codilityMy C++ Solution. O(N) #include <climits> int solution(vector<int> &A) { int max_depth {}; int max_lvl = {}; int min_lvl = INT_MAX; for (unsigned int i...
  • Carlos Martínez Trueba June 21, 2023 at 4:45 pm on Solution to Count-Distinct-Slices by codilityWell, I have tried this one with C#. Apparently, everything is correct, my code is correct and efficient, but for particularly one of the tests...
  • Jay Bariya April 28, 2023 at 11:11 pm on Solution to Brackets by codilityCompletely uneccessary solution using numbers. Python solution - O(N). def solution(S): bracket_map = {"{":10,"}":-10,"[":20,"]":-20,"(":30,")":-30} #check if even number of brackets N = len(S) if N...
  • Jay Bariya April 28, 2023 at 11:08 pm on Solution to Brackets by codilityVery nice solution!
  • Jay Bariya January 18, 2023 at 3:54 pm on Solution to Triangle by codilityI initially solved it using how Sheng did to just find the mere existence of a trianglular. My code can be modified to find all...
  • Jay Bariya January 17, 2023 at 1:23 am on Solution to Max-Product-Of-Three by codility100% Python solution. Hi @Sheng, I tried solving it without using sorting. Just min and max. I believe my complexity is O(N), but Codility shows...

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
© 2023 Code Says
Powered by WordPress / Theme by Design Lab
  • Contact Me
  • About Me
  • Privacy Policy