Author Archives:

About phoxis

Computer Science Graduate Student

Number of trailing zeros in factorial of an integer

An integer n is given, the task is to find the number of trailing zeros in n! .

Posted in Coding Discussions, Computer Science, Others | Tagged , , , | Leave a comment

Find Sum (i … j) in a list

The problem is to sum the ith to jth element of a given list. The easiest solution runs in time, which starts are the ith index and adds up the numbers in the list until it reaches the jth index. … Continue reading

Posted in Coding Discussions, Computer Science | Tagged , , | Leave a comment

Find a String in an Alphabet Grid

Everybody of us has definitely played the word search game in which a grid of characters are given, and a list of words are given which are to be found in the grid horizontally, vertically or diagonally. In this post … Continue reading

Posted in Coding Discussions, Computer Science | Tagged , | Leave a comment

Towers of Hanoi Iterative process: simulating recursion

The last post Recursive Solution to Towers of Hanoi described the well-known recursive definition and implementation of the Towers of Hanoi problem. This post is an extension presenting the same problem iteratively by simulating the recursion stack. This implementation will … Continue reading

Posted in Coding Discussions, Computer Science | Tagged , | Leave a comment

Recursive Solution to Towers of Hanoi

Towers of Hanoi is a mathematical game or a puzzle in which there are three pegs, and some disks (originally 8) of different radius placed on top of one another such that no larger disk is placed on a smaller … Continue reading

Posted in Coding Discussions, Computer Science | Tagged , | 3 Comments

Using scanf safely

Beginners find that the scanf function behaves strangely when you input a character when scanf expects an integer or float. When used inside a loop (taking options), it loops infinitely. Here is a short post which explains what it happens, … Continue reading

Posted in C Language, Computer Science | Tagged , | Leave a comment

Fix dark video in Skype for Linux

I was very much disappointed when i installed Skype in Fedora, three causes which are as follows in the order. First, Skype for Linux is very old version (2.2 beta) than the Windows Skype, second, the video was too dark … Continue reading

Posted in GNU+Linux+FOSS, Tutorials | Tagged , , | Leave a comment

Simple script to restart services automatically when stopped in Fedora/Redhat

When occasionally the services like Apache or MySQL or other rc.d script crashes and stops working, then instead of restarting them manually, it may be more desirable to restart them automatically. A friend of mine asked about such an issue … Continue reading

Posted in Computer Science, GNU+Linux+FOSS, Linux / Unix Shell, Tutorials | Tagged , , | 3 Comments

Running Skype for Fedora x86 in Fedora x86_64

After I installed Fedora 16 x86_64, i needed to install manually Skype for linux, which is available from This link, as it is not in Fedora repositories. After clicking the Skype icon from the kickstart menu, the Skype icon kept … Continue reading

Posted in GNU+Linux+FOSS, Tutorials | Tagged , , | 4 Comments

Installing the applications from older version in a new fresh installation of fedora

I was using Fedora 15 32 bit for a long time but i felt the need to install a 64 bit edition for some memory limitations in the system. Therefore I downloaded the Fedora 16 x86_64 iso file from https://fedoraproject.org/ … Continue reading

Posted in GNU+Linux+FOSS, Tutorials | Tagged , | 2 Comments