Author Archives: Thomas Mani P

Big ‘O’ notation – complexities O(n2) and O(2n)

The unit of measurement of efficiency of an algorithmA theoretical measure of the execution of an algorithm, usually the time or memory needed, given the problem size n, which is usually the number of items. Two factors are Time and … Continue reading

Posted in Basic | Leave a comment

Wrapper Class

is a class which defines a primitive data type. A Wrapper class is a class whose object wraps or contains a primitive data types. Wrapper class in java provides the mechanism to convert primitive into object and object into primitive. … Continue reading

Posted in Basic | Leave a comment

Interface – Class

An interface is a blueprint of a class having static constants and abstract methods. An interface is a reference type in Java. A class that contains public static final data types and declaration of abstract method Class contains static or … Continue reading

Posted in Basic | Leave a comment

fall through condition in switch()case

If a case does not end with a break statement, it will execute the following cases until and unless it counters a break statement. This condition is called fall through condition

Posted in Basic | Leave a comment

Binary tree

1. It is acyclic 2. No two node can be similar or identical 3. It is recursive 4. There is only one unique path between two nodes. 5. Rooted data structure OR Linear data structure OR Dynamic data structure 6. … Continue reading

Posted in Basic | Leave a comment

this() and Super()

this ( ) is used to refer to the instance variables of the class. super ( ) is used to invoke the super class’s constructor/ instance variable/methods

Posted in Basic | Leave a comment

Merge Sort

Merge two sorted array into a third array Continue reading

Posted in Array | Leave a comment

Sort matrix

Write a program to declare a matrix A [][] of order (MXN) where ‘M’ is the number of rows and ‘N’ is the number of columns such that both M and N must be greater than 2 and less than … Continue reading

Posted in Matrix | Leave a comment

Big-Small

Write a program to declare a matrix A [][] of order (MXN) where ‘M’ is the number of rows and ‘N’ is the number of columns such that both M and N must be greater than 2 and less than … Continue reading

Posted in Matrix | Leave a comment

Bank-Acount

A super class Bank has been defined to store the details of a customer. Define a sub-classAccount that enables transactions for the customer with the bank. The details of both theclasses are given below:Class name : BankData member/instance variable:name : … Continue reading

Posted in Inheritance | Leave a comment