Aptitude

ShareIn the Hindu-Arabic system, we use ten digits 0, 1, 2, 3, 4, 5, 6, 7, 8 and 9 to form numbers. This number system is also famously known as the decimal number system. Digits in this system have a face value and a place value.

The face value of any digit in a number is the value of the digit itself regardless of the position it occupy in the number. For example, if we have a number 1234 then the face value of 1 is 1. Similarly, the face value of 2 is 2 and so on.

The place value of a digit in a given number is directly dependent on its position in the number. For example, if we consider the number 1234 then the place value of digit 1 is 1000 as it is at the thousandth place. Similarly, the place value of 2 is 200 as it is in the hundredth place. Likewise 3 has a place value of 30 in this number as it is at the tenth place and digit 4 is at the unit place so its place value is 4.

Lakh | Ten Thousand |
Thousand | Hundred | Ten | One | |

1234 | 1 | 2 | 3 | 4 | ||

1 | 1 | |||||

123456 | 1 | 2 | 3 | 4 | 5 | 6 |

Hundred Thousand |
Ten |
Thousand | Hundred | Ten | One | |

1234 | 1 | 2 | 3 | 4 | ||

1 | 1 | |||||

123456 | 1 | 2 | 3 | 4 | 5 | 6 |

So, to get the place value of any digit in a given number we simple multiply that digit with the value of that place.

Example, place value of 1 in 1234 = 1 x 1000 = 1000 as 1 is at the thousandth place.

These are the counting numbers generally denoted by the letter N and start from 1 and goes to infinite.

N = {1, 2, 3 …}

All natural numbers are positive and the smallest is 1.

Whole Numbers denoted by the letter W is a set of all the natural numbers and zero.

W = {0, 1, 2, 3 …}

Whole numbers are the non-negative number and zero is the smallest whole number.

Integers are the set of numbers consisting of whole numbers and negative numbers. They are generally denoted by the letter I.

I = {…, -3, -2, -1, 0, 1, 2, 3 …}

We categorize integers into two groups – positive integer and negative integer.

Positive integers consist of natural numbers whereas negative integers consist of negative of the natural numbers.

Positive integer is denoted by I+ whereas Negative Integer is denoted by I-

I+ = {1, 2, 3 …}

I- = {…, -3, -2, -1}

Note! Zero is not a positive or negative number.

Numbers that can be expressed in the form of x/y where y is not equal to zero is called rational numbers.

Example, 1/3 is a rational number.

Numbers that cannot be expressed in the form of x/y are called irrational numbers.

Example, PI is an irrational number. Square root of 2 is an irrational number.

Real numbers are the numbers that consists of the rational and irrational numbers. They are generally denoted by the letter R.

Numbers that are divisible by 2 are called even numbers. If the digit at the unit’s place is 0, 2, 4, 6 or 8 then the number is an even number.

Numbers that are not divisible by 2 are called odd numbers.

This is undefined. We don’t divide number by zero.

Once can divide any number.

Numbers that ends with 0, 2, 4, 6 or 8 are divisible by 2. And any number that is divisible by 2 is called an even number. If a number is not divisible by 2 then we call it an odd number.

If the sum of the digits of a given number is divisible by 3 then the number is divisible by 3.

Check if 123 is divisible by 3?

1+2+3 = 6 and 6 is divisible by 3 so 123 is divisible by 3.

If the number made by the last two digits of any given number is divisible by 4 then the given number is divisible by 4. And if the last two digits of a given number is zero then the number is divisible by 4.

Example, 120 is divisible by 4 as because the last two digits are equal to 20 and we know that 20 is divisible by 4.

Similarly, 12300 is divisible by 4 as the last two digits are zeros.

If the last digit of a given number is either 0 or 5 then the number is divisible by 5. Example, 25 is divisible by 5 and so, is 10.

A number is divisible by 6 only if it is divisible by both 2 and 3.

Example, 12 is divisible by both 2 and 3 so, 12 is divisible by 6.

On the other hand, 123 is divisible by 3 but not by 2. So, 123 is not divisible by 6.

A number is divisible by 7 only if the difference of twice the digit at the unit place and the number formed by rest of the digits of the number is divisible by 7.

Example, 105 is divisible by 7 because 10 – 5(2) = 0 which is divisible by 7.

Similarly, 371 is divisible by 7 because 37 – 1(2) = 35 which is divisible by 7.

If the number formed by the last three digits of a number is divisible by 8 then the given number is divisible by 8.

Example, 1256 is divisible by 8 as because 256 is divisible by 8.

If the sum of the digits of a given number is divisible by 9 then the number is divisible by 9.

Example, 108 is divisible by 9 as because 1+0+8 = 9 which is divisible by 9.

On the other hand 123 is not divisible by 9 as because 1+2+3 = 6 which is not divisible by 9.

If the last digit of a given number is 0 then that number is divisible by 10.

If the difference of the sum of the digits at the odd place and the sum of the digits at the even place is divisible by 11 then the given number is divisible by 11.

Example, if the given number is 123456

Then sum of the digits at the odd places = 1+3+5 = 9

And the sum of the digits at the even places = 2+4+6 = 12

There difference = 9 – 12 = -3 which is not divisible by 11

So, 123456 is not divisible by 11.

Similarly, if the given number is 121

Then sum of the digits at the odd places = 1+1 = 2

And the sum of the digits at the even places = 2

There difference = 2 – 2 = 0 which is divisible by 11

So, 121 is divisible by 11.

- Square of every ODD number is ODD.
- Square of every EVEN number is EVEN.
- Square of any number will never end with 2, 3, 7 and 8.
- Product of three consecutive natural numbers is always divisible by 6.
- (x
^{n}- a^{n}) is divisible by (x - a) for all values of n. - (x
^{n}- a^{n}) is divisible by (x + a) for even values of n. - (x
^{n}+ a^{n}) is divisible by (x + a) for odd values of n. - (n
^{3}- n) is divisible by 6 for all values of n where n is a natural number. - Number of prime factors of a
^{x}x b^{y}x c^{z}= x+y+z where a, b and c are prime numbers.

- Maximum subarray problem - Kadane's Algorithm Programming
- Maximum subarray problem Programming
- Find median of an array Programming
- Find the minimum and maximum number in an array using Tournament Method Programming
- Find the minimum and maximum number in an array Programming
- Reverse a string Programming
- Design Patterns - Strategy Pattern Design Patterns
- PostgreSQL - SELECT FROM Table PostgreSQL
- PostgreSQL - INSERT INTO Table PostgreSQL
- PostgreSQL - CREATE Table PostgreSQL