Speeding up SQLRPGLE by using indexes.

By | Technology | No Comments

I have always been partial to SQLRPGLE rather than writing around those chain statements in the RPGLE. More often than not, we are worried about the correctness and not about the efficiency of the program. Even I was not be excused on this accusation, well we can argue how can you increase the performance if we don’t know how it works right? So,…

Read More

Angry Professor – Python Problem

By | Technology | 2 Comments

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…

Read More

Hackerearth – Permutation Problem

By | Other | No Comments

Here is one more coding challenge that I have solved in HackerEarth. Problem Statement You are given an array of N integers which is a permutation of the first N natural numbers. You can swap any two elements of the array. You can make at most K swaps. What is the largest permutation, in numerical order, you can make? Input…

Read More