Before submitting an Application Form to Adsense




adsense approvalWhen you make a blog or start your own website you'd come across a term Adsense. Google Adsense actually. Following may be the reasons why you'd like to read this article.
  • You were blogging just for fun but suddenly discovered that you can even earn via advertising. Of course, Adsense is the first choice. Then you went googling & landed here.
  • Your sole aim after blogging/website building was to make some extra bucks. If you've seeded & watered, you'd hopefully wait for fruits & flowers, No Doubt.
We'll take it from here considering ourselves a newbie.

Complexity or Order of Growth in Programming




Complexity or Order of Growth of a program plays a major role in efficient programming. It actually gives an idea of the time taken by your code to run and return correct answer.
  • Constant Complexity O(1) : constant running time
  • Linear Complexity O(n) : linear running time
  • Logarithmic Complexity O(log n) : logarithmic running time
  • Log-Linear Complexity O(n log n) : log-­linear running time
  • Polynomial Complexity O(n^c) : polynomial running time (c is a constant)
  • Exponential Complexity O(c^n) : exponential running time (c is a constant being raised to a power based on size of input)
But this doesn't explain anything, so lets go through some simple examples of each of them.

Python Objects: Dictionary (dict)




Dictionary or dict is generalization of Lists
In list we use [], while in dict {}

>>> l = ['three', 'five', 'one', 'seven']
>>> l[0] #here 0 in l[0] is called index and 0th index refers to three
'three'
>>> l[1]
'five'
>>> l[2]
'one'
>>> l[3]
'seven'


Python Objects: Lists: Mutation of List




Lists are almost same as Tuples, but a huge difference is, Lists are mutable i.e. Lists can be modified after they are created unlike Tuples and Strings

For example, consider a Tuple:

Objects of Python : Tuples




What are Tuples?
Just go through following operations.

>>> t1 = (1,'two',3) #declaring tuple
>>> t1
(1, 'two', 3)
>>> print t1 #does the same thing as above
(1, 'two', 3)
>>> type(t1) #lets check the type of tuple
<type 'tuple'>


Recursion in Programming - Explained




We'll take an example of multiplying two numbers without using multiplication operator. This can be done in typical way of iteration.

For eg: If we are asked to multiply x and y, we'll keep adding x to x for y times

See the following code:

Finding Roots - Advanced (in Python)




Following is the explanation for finding roots (square root, cube root.... nth root) It requires prior knowledge of Bisection Search

This is the advancement of basic version of finding square root of only perfect squares