Skip to main content

Posts

Cosmic Techie

Most fascinating SuperPower is to play with Matter and Energy. It is the power to have possession over the Cosmos. To fulfil this desire, programmer play with code and hardware.
Recent posts

Coding Problem: Series Based

Coding question based on series are usually asked in coding section of various coding tests.   Find the nth term of the series: 0,0,7,6,14,12,21,18, 28_ _ _ _ Find the nth term of the series:  1 , 1 , 2 , 3 , 4 , 9 , 8 , 27 , 16 , 81 , 32 , 243 ,_ _ _ _   Find the nth term of the series:  0, 0, 2, 1, 4, 2, 6, 3, 8, 4, 10, 5, 12, 6, 14, 7, 16, 8

Coding Problem: Fibonacci Series

Problems based on Fibonacci Series: 0, 1, 1, 2, 3, 5, 8, 13, 21 ,34, 55, 89, 144 ......... First=0 Second=1 Third= 0+1= 1 Sum of Previous 2 values Fourth= 1+1= 2 Fifth= 1+2= 3 Sixth= 2+3= 5 And so on..... Print the Nth term of the fibonacci series: Print N terms of fibonacci series:

Coding Problem: Area of Circle

 Write a program to print the area of a circle of given radius ' r ' up to 2 decimal places. Code: Output:

Coding Problem: Oddly Even

Find the difference between the sum of odd and even position digits Example: Input 1234 Output 2 Explanation: sum of values at odd position: 1+3=4 sum of values at even position: 2+4=6          6-4=2 Code:

Coding Problem: Check for Leap Year

 Given a number N, the task is to check if N is a Leap Year or not. A leap year is exactly divisible by 4 except for century years (years ending with 00). The century year is a leap year only if it is perfectly divisible by 400. Code:

Coding Problem: Based on Caesar Cypher

This a coding problem based on Caesar Cypher(or Cipher). Caesar Cipher Technique is a simple and easy method of encryption. It is a simple type of substitution cipher in which each letter of plain text is replaced by a letter with some fixed number of positions down with alphabet. This is used in a way: Given: a=z  b=y ............ z=a For example: Input: abc Output should Be:  zyx Code: