Tag Archives: Programming

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

Accessing private data members directly outside from its class in C++

Private members in C++ cannot be accessed from outside the class directly. In this post I will tell an interesting fact, that in C++ however there are means with which you can access/modify the values of the private members of … Continue reading

Posted in C Language, Computer Science | Tagged , , | 1 Comment

Bash Script: Reading ID3v1 Tags

mp3 files contain track name, artist name, etc meta data about the music file itself. The meta data format used in mp3 files are called the ID3 tags. There are different versions of ID3 tags available. The objective is to … Continue reading

Posted in Computer Science, Linux / Unix Shell | Tagged , , , | Leave a comment

Bash Script: Find occurrence count of a string in a file

A file is given, and a string is given. The number of time the string occurs in the file, and the line number in which the string occurs in the file needs to be found out and printed.

Posted in Computer Science, Linux / Unix Shell | Tagged , , | Leave a comment

Reviewing the GNUSim8085 (v1.3.7)

This article reviews the GNUSim8085 (v1.3.7) a graphical simulator, assembler and debugger for the Intel 8085 microprocessor. The Intel 8085 is an 8-bit microprocessor that was launched by Intel in 1977 and hence is something that we have never seen … Continue reading

Posted in GNU+Linux+FOSS, Reviews | Tagged , | 3 Comments