Okay, I have been to many job interviews so far, some successful and some not so much but today’s interview that I attended for takes the cake for being weirdest if not stupidest interview I have ever attended. Here is how it goes. There were two interviewers in the panel. Note:* This was supposed to be a technical interview. Me:…

The other day I was talking to my friend and he asked me this. How would you implement a Least Recently Used Data-structure with a good time complexity. Below is how I came up with my solution to achieve this. I am using a Dictionary in Python (Hashmap in case of Java) to store the Key and Node information and a…

A Discrete Mathematics professor has a class of N students. Frustrated with their lack of discipline, he decides to cancel class if fewer than K students are present when class starts. Given the arrival time of each student, determine if the class is canceled. Input Format The first line of input contains T, the number of test cases. Each test…

So Here is another challenge from the Code Fights, that I solved today. The problem is as following:

So I joined this new website ‘Code Fights‘ which has some very exciting challenges, one of which is the following “Happy New Year Challenge”. The gist of it is as following:

I came across a programming puzzle in which we are given a positive integer N (0 < N< 10). we need to print a palindromic triangle of size N. For example if N = 5 then the expected output is [dt_code]1 121 12321 1234321 123454321[/dt_code] Below is my solution written in python: **Note that the above code is written for…

## Recent Comments