Cyclic Rotation Task Again, this is a simple task: Write a function: vector<int> solution(vector<int> &A, int K); that, given an array A consisting of N integers and an integer K, returns the array A rotated K times. Solution You just calculate the previous index of each element and populate the answer accordingly #include <iostream> using […]
Author: t-d-k
Binary Gap Task This is a simple task: A binary gap within a positive integer N is any maximal sequence of consecutive zeros that is surrounded by ones at both ends in the binary representation of N. You simply have to find the length of the maximum run of zeros in the binary representation of […]
Codility Lessons Solutions Codility is a company that provides testing of candidates coding skills. Essentially their site asks the applicant to write a function to perform a task, then runs unit tests against the answer. There is a post about their site here. They also provide a set of tasks that anyone can take and […]
Codility – First Thoughts
Overview So a potential client asked me to take a test at the Codility site. This is a site that does an automated test of candidate’s coding skills. It basically asks you to write a function to perform a task, then runs unit tests against your function. They provide a demo, this is a very […]
Domains for sale
I have the following domains for sale. The Godaddy appraisal is in brackets followed by my asking price. GU5H.COM (godaddy: $786, my price $450) I5EX.COM (godaddy: $1253, my price $450) IXESE.COM (godaddy: $1541, my price $950) IX-S.COM (godaddy: $1416, my price $450) ឧ.COM (Godaddy domain appraisal does not work with IDNs, but namebio shows “z.com” […]
Why shorthand? Many of us spend a lot of time writing, yet the way most of us write is highly inefficient; the average writing speed is just 13 words per minute (wpm), but we read at 200 wpm, speak at 160 wpm, and understand words spoken at 300 wpm. So various systems of faster writing […]