Data Science at University of Minnesota

Recently, many people have asked me about the data science program at the University of Minnesota, Twin Cities. I am continuing my 2nd semester in data science program. This blog...

Multithreaded solution for printing sequence 010203040506 (Careercup)

Print series 010203040506 using multiple threads. 1st thread will print only 0, 2nd thread will print only even numbers and 3rd thread print only odd numbers. CareerCup Link In this...

Domino and Tromino Tiling - Dynamic Programming

Problem to the Link - LeetCode Let’s understand the problem. You are given few tiles of shape (2x1) and L shaped. See picture below. We have to fill the 2xN...

Logistic vs Linear. Why Sigmoid?

I have been asked many times that why do we need logisitic regression and sigmoid function. Why can’t we simply fit a linear regression. Here is what I think sigmoid...

Issues using floats as key in Maps/Sets

Let’s understand this with a simple problem? Given a list of numbers find all unique fractions A[p]/A[q] for given p < q. [1,2,4] => [1/2,1/4,2/4] => [0.5,0.25,0.5] => so Answer...