Posts

Application not responding!!

Hi folks! What is more personal in today's age and times than the 5' inch wonder in your hands or pockets! Well, we just can't get enough of our mobile phones today, whether to checkout a new Youtube video, catch up with friends, book a cab, or cross that nagging next level of clash of clans, we are totally hooked on to our phones. But, it just drives me nuts when I see my app crashing, or just being a tad too slow, when I need its service quick. We can all agree, we don't like that and yet, it happens a lot too often. Here, we are going to list some of the simple reasons why a certain app on your mobile might not be responding well to you. Weird behavior #1 You click a certain button on an app, but it doesn't seem to respond!! - Just press the power button two times quick, remember you don't need to switch off/on your mobile. Why this helps? Well without getting too technical, i would just say that doing so, flushes out the layer that is d...

Find size of ArrayList in minumum steps

This line is just meant to add an ad here. This is link to a product on amazon.in Hey fellow coders! I am going to give a solution to a rather simple question which is sometimes asked in software programming interviews. " There is one class which has private array list and this array list is initialized in constructor of this class. We have one public method getItem(int i) { ” return ith item of array list” }, We need to know the size of array list. We can only call getItem method. " For more clarity, you can also look at this link:  https://ideone.com/VaE0QL Solution: Well to solve this problem, we require a little bit knowledge of how an arraylist grows in size. An arraylist is better for situations where a programmer doesn't know in advance, the number of items he will need to store in an array. For eg. let's say Adam declared an arraylist of size 5. Now, if he needs to add 4 more elements, rather than having to declare a new array each ti...

Segment trees

Image
Here I like to discuss cool data structures and algorithms that can computer programmers become much better in what they do :) and its fun to learn and discuss , so lets learn something called 'Segment trees' Before we talk about what it does , lets discuss whats the need for such a data structure. Suppose we have an array of N numbers a[1],a[2],....a[N] Now I have two operations that I can perform on this array Retrieve the sum of any sub-array between index i..j Modify the value of any element a[i] So whats the complexity of each of these operations Retrieve the sum of any sub-array between index i..j - Big-Oh(N) since the size of sub-array can vary from 1 to N Modify the value of any element a[i] - Big-Oh(1) , ie. constant time Now lets suppose N is very large then computing the size of each subarray is very costly so we need to think and find  a mechanism that helps to reduce the complexity of finding the sum of any sub-array of the given array. How?? ...

Edit that pdf....

Often I face this problem in finding a good tool to edit a PDF. At last I found a cool online pdf editor at pdfescape. To visit the site click the below link http://www.pdfescape.com/ So for a quick trial you can quickly begin as an Unregistered user by clicking the link on the top right corner... Create pdf forms ,edit your pdfs with a lot of cool options this online tool boasts of :) And if you are new this is a nice tutorial to get you started!!! View this document on Scribd