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
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
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
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
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
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
Merge Sort
Merge two sorted array into a third array Continue reading
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
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
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