Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x

Algorithms

An algorithm is a self-contained step-by-step set of operations to be performed. Algorithms exist that perform calculation, data processing, and automated reasoning. Starting from an initial state and initial input (perhaps empty), the instructions describe a computation that, when executed, proceeds through a finite number of well-defined successive states, eventually producing "output" and terminating at a final ending state. The transition from one state to the next is not necessarily deterministic; some algorithms, known as randomized algorithms, incorporate random input.

Share tech news, updates, or what's on your mind.

Sign up to Post

Trending Tech Everyone Should Know About - My Thoughts
I've been thinking about this subject for a few days now, trying to come up with something unusual. But the thing that keeps coming to mind—even though I feel it's an obvious answer that everyone already does know about—is Artificial Intelligence & Machine Learning.

Why? Well first, it's technology that impacts everyone, regardless of how involved you are in the tech industry. I've got little doubt that we're right on the cusp of major social change as a result of machine learning—change as significant as the Industrial Revolution. We've got self-driving cars inevitably hitting the mainstream in the near future. There's cancer detection systems that are faster and more accurate than human analysts. AI systems being trained to defend against cyberattacks. Movie dialog being written by algorithms. The list goes on and on...

And second, while these advancements will absolutely push us forward in exciting new ways, they'll also destroy many jobs. And while that job loss can be terrifying, AI opens us up for entirely new sorts of jobs, major changes to the way work is done, and more that we can't even fully conceive of yet.

Will most knowledge workers of the future become "bot wranglers"? Will some sort of universal basic income
2
New feature and membership benefit!
LVL 10
New feature and membership benefit!

New feature! Upgrade and increase expert visibility of your issues with Priority Questions.

Here's an interesting coding puzzle:

A trader can perform two buys and two sells in a day of a given stock. An array of positive integers represents the share price of this stock at different times of the day (index i = 0 represents hour 1, i=1 represents hour 2, etc). The trader must always sell any current shares he has before he buys more shares. Write a function that determines the maximum profit the trader can make by buying and selling stock for a given day.

int maximizeProfit(int[] prices) {
   // Your code here
}

ex:
[10, 22, 5, 75, 65, 80]
The maximum profit is 87: buy at 10 sell at 22, buy at 5, sell at 80.

Open in new window


The solution should have time complexity O(n).
2
If you're interested in block chains (as used in bit coin and now for many other purposes) I found this to be a very good primer.
6
I've been really interested in recommendation systems lately which has lead my down a few rabbit holes. One of these landed on a similarity measurement called Jaccard similarity which is a fairly straightforward metric for communicating how many elements two sets have in common.

This turns out to be very difficult to compute without some tricks but can be estimated with a certain degree of confidence using minHashing. If this sort of thing interests you I would check out this blog post by Chris McCormick - its one of the best explanations I came across (even though its in the context of document similarity). There is even some python code provided.

I would summarize the technique in one sentence as: by randomly shuffling the union of two sets and looking at the first element in the new, shuffled set, the probability that it is an item belonging to their intersection is equal to the Jaccard Similarity.

http://mccormickml.com/2015/06/12/minhash-tutorial-with-python-code/
5

Algorithms

An algorithm is a self-contained step-by-step set of operations to be performed. Algorithms exist that perform calculation, data processing, and automated reasoning. Starting from an initial state and initial input (perhaps empty), the instructions describe a computation that, when executed, proceeds through a finite number of well-defined successive states, eventually producing "output" and terminating at a final ending state. The transition from one state to the next is not necessarily deterministic; some algorithms, known as randomized algorithms, incorporate random input.