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: Hash Set

A Simple Expiring Set in Python

17 Jan

Months ago, I coded a tiny crawler to monitor some electronics deals. I extracted a list of my target products from the homepage, and on each product page tried to add it to my cart. Basically I need to: Check … Read More »

Python Crawler, Hash Set 1 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

  • Charles August 9, 2022 at 5:42 am on Solution to Fib-Frog by codilityMy solution, very clean, well explained, and scores 100% on Codility. def solution(A): A.append(1) # Add the target location on the right of the bank...
  • Amit Dhawan July 16, 2022 at 8:41 am on Solution to Tape-Equilibrium by codilityMy Codility Java 100% success solution: public int solution(int[] A) { int length = A.length; int previousSum = 0; double sum = 0; // get...
  • Michiel van der Blonk July 14, 2022 at 9:19 am on Solution to Fish by codilityI like your solution. If I understand correctly, It works by taking fish, have them battle and then place the winner on the stack.
  • Michiel van der Blonk July 13, 2022 at 8:31 am on Solution to Min-Avg-Two-Slice by codilityMy JavaScript 100% version. I noticed we only need a call to findMinAverage once, if we use pointers for left and right index. function getAverage(sums,...
  • Sebastian June 24, 2022 at 6:16 am on Solution to Abs-Distinct by codilityC# Code using System.Linq; using System; public static int AbsDistinct(int[] A) { var B = from n in A select (long)(Math.Sign(n) * (long)n); return B.Distinct().ToArray().Length;...
  • Haseeb Basra June 14, 2022 at 8:08 am on Solution to Odd-Occurrences-In-Array by codilityPHP-- 100% accurate O(N) or O(N*log(N)) complexity function solution($a){ $result = array_count_values($a); $result = array_filter($result , function($a){ return ($a % 2) && 1; }); return...
  • Hrittik June 10, 2022 at 3:26 am on Solution to boron2013 (Flags) by codilityJavascript 100% function flags(A) { let peaks = []; if (A.length < 3) return 0; for (let i = 1; i < A.length - 1;...
  • umesh May 24, 2022 at 11:16 pm on Solution to Equi-Leader by codilityMy solution in Python, with comments: def EquiLeader(A): # write your code in Python 3.6 if len(A) == 1: return 0 ln = len(A) As...
  • Hrittik May 23, 2022 at 7:36 am on Solution to Min-Avg-Two-Slice by codilityJavascript 100% function minAvgTwoSlice(A) { // initializing minSlice to a number that is definitely larger than the entire array's average let minSlice = A.reduce((i, a)...

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