Quantcast
Channel: www.VinaySingh.info
Browsing all 15 articles
Browse latest View live

Non-inheritable and non-instantiable class

In this post we would see how to design a class which can neither be instantiated nor inherited. Java language has two modifiers/keywords which provide the individual functionality. A class declared as...

View Article


Spiral matrix

In this post I would be discussing the implementation of a program to fill a square double dimension array in a circular fashion, also known as spiral matrix due to it’s appearance. This problem on...

View Article


Single character identifiers

The objective of this post is to determine the number of single character identifiers which can be constructed in the Java programming language. The first respone is usually 54. The underlying logic...

View Article

Unique number

A unique number can be defined as a positive integer without leading zeros, in which each digit occurs only once (no duplicate digit). There can be various methods to detect whether or not a given...

View Article

Pangram (holoalphabetic) detection

A pangram (Greek: pan gramma, “every letter”) or holoalphabetic sentence for a given alphabet is a sentence using every letter of the alphabet at least once.  For example: “The quick brown fox jumps...

View Article


Unique number using bitwise operator

A unique number can be defined as a positive integer without leading zeros, in which each digit occurs only once (no duplicate digit). There can be various methods to detect whether or not a given...

View Article

ISC Computer Practical 2015 Question 1

Given two positive numbers M and N, such that M is between 100 and 10000 and N is less than 100. Find the smallest integer that is greater than M and whose digits add up to N. For example, if M=100 and...

View Article

ISC Computer Practical 2015 Question 2

Write a program to declare a square matrix A[][] of order MxM where ‘M’ is the number of rows and the number of coloumns, such that M is greater than 2 and less than 10. Accept the value of M as user...

View Article


ISC Computer Practical 2015 Question 3

Write a program to accept a sentence which may be terminated by either ‘.’ or ‘?’ only. The words are to be separated by a single blank space. Print an error message if the input does not terminate...

View Article


Plotting a sine graph in text mode

The purpose of this post is to demonstrate plotting of graphs in text mode using printable characters. I would be taking a simple case in which the x-axis is aligned vertically, like shown in the...

View Article

Evil number program in Java

ISC Computer Science Specimen Question Paper 2016 (Q1, Evil number) An Evil number is a positive whole number which has even number of 1’s in its binary equivalent. Example: Binary equivalent of 9 is...

View Article

Base – ISC Computer Science Practical 2004

The following question was asked in ISC Computer Science Practical (Paper 2) Examination in 2004. The question originally appeared in ACP-ICPC. Source. Find the base Numbers have different...

View Article

Array Pattern

ISC Computer Science Specimen Question Paper 2016 (Q3, Array Pattern) Given a square matrix M [ ] [ ] of order ‘n’. The maximum value possible for ‘n’ is 10. Accept three different characters from the...

View Article


Circular Prime – Solution of ISC Computer Practical 2016

ISC Computer Science Practical 2016, Question 1 A Circular Prime is a prime number that remains prime under cyclic shifts of its digits. When the leftmost digit is removed and replaced at the end of...

View Article

Sorting non boundary elements

Sorting non boundary elements – ISC Computer Science Practical 2016, Question 2 Write a program to declare a square matrix A[][] of order (M x M) where ‘M’ must be greater than 3 and less than 10....

View Article

Browsing all 15 articles
Browse latest View live