## Rotating an Array by a fixed distance

Problem Statement Another question which is favorite among interviewers is rotating an array by a fixed distance. Before understanding how can we do that, it is important to understand what it means to rotate an array. Given an array of length N, rotation by a fixed distance K means shifting each element to the right by K indices. The indices of course are computed in a rotational manner such that if the new index of the element goes beyond the array boundaries, it can be wrapped to the beginning of the array. Here is an example of input and output. The problem seems very easy until s...

## Removing Duplicates from Sorted Linked List

Problem Statement You are given a singly sorted linked list, which has repeated elements. The task at hand is to remove the duplicates from the linked list. Here is a diagram to explain the problem statement Solution for Removing Duplicates from Sorted Linked List As the linked list is sorted, if two nodes contain duplicates, they will always be adjacent to each other. Hence, the trick is to Maintain two pointers (Current_Node_Ptr and Next_Node_Ptr). If the Next_Node_Ptr points to a duplicate node, delete the node and advance the Next_Node_Ptr Make the next of Current_No...

## TechieMe New Android App

Hello there! I have recreated a completely new and better android app for this blog. Have a glimpse of the new UI and features below This app is a companion to the this programming blog  and a possible improved replacement to the older version  This is an ever increasing knowledge repository, with classic and configurable user interface and awesome user experience. The content is cleanly segregated and presented. The app contains posts on topics like: 1) Java/J2EE 2) Algorithms 3) Datastructures The Send a Suggestion feature allows you to request ...