Thursday, October 11, 2007

Personel Interview.........

Hi friends....
Today we had TCOM session.In that session Madam taught us
how to face personal interview.There we discuss lots of question regarding interview.I learned lots of thing about communication, skill, attitude, aptitude, etc.The first question is why company taking interview while they may be choose his candidates by written test.They make lots of effort towards taking interview ?According to me company searching good candidate for his organisation.If company choose their candidate by simply written test their is no doubt candidate which selected is good in knowledge. But is it possible that they all are also good in communication, judgement, interested in company, etc...For example if a candidate is not interested in that organisation for which he selected and he joined company for sake of job.After some time that candidate joined another company.Then first company will be go into loss, because he didn't not check candidate attitude towards his company.sometime other difficulties are also possible.So, company taking personal interviews to judge candidate attitude, aptitude, goal of his life.candidate is interested in his organisation or not.It is very important for company to choose good candidates because they all going to be a part of company and company's reputation is directly depends on those candidate.The product's quality which company delivered, customer satisfaction etc. directly influenced by employees of company.
Now I am coming on how to face interview........
I learned today's session how to face interview.The first work we must do is to clearly judge what we want to do. Set goal and then proceed.We must clear idea about the job we are applying for. Because if interviewer judge that this person is not interested in our company then they will be reject that candidate. One thing we have to must remember that every man getting chance to do something better but he missed that chance and waiting for another chance. And waiting for ever....If we really want to do then we ready to catch the chance.When we get chance change to it opportunity. Its very important that attitude must be positive. Positive attitude gives strength to give answer during interview.One another important thing I learn that before giving answer of any question think for moment.
Its give positive response to interviewer and it also provide self
confidence to give answer. Some time interviewer ask question from different pattern so we careful to give all those questions answer because interviewer motive to judge your aptitude skill and your response towards unexpected question. So before attending interview work on attitude, field of interest, communication skills, interpersonal skills,confidence, problem solving skills, self motivation....Some of general question on which we should must prepare like- tell me about your self ?, What you want to do in your life,what your greatest strength, what your weekness ?, How do you good for this job ?, etc... I learned that main factors for failure in interview is as candidates behaviour during interview like excitement or nervousness, lack of concentration, lack of confidence, lack of subject knoweldge. In last failure is not end of career. If we get failure in interview try to remove weekness and improve skills. Hard work is last option to get success.....

Tuesday, October 9, 2007

Graph theory.........

Hi friends.....
Today I am going to one of interesting topic of DSAL "GRAPH".
graph have been used in a wide variety of applications. Some of applications are computer network,the analysis of electrical circuits, finding shortest routes, project planning,identification
of chemical compounds, statistical mechanics, genetics,cybernetics, linguistics, and so on. WWW is good example of directed graph.

:> Graph can be defined as : A graph G consists of two sets V and E. The set v is finite,non-empty set of vertices. The set E is a set of pairs of vertices, these pairs are called edges. the notation we generally used for graph is G=(V,E).
The advantage of graph over other data structure is that it can represent different types of relationships, whereas tree can represent hierarchical types of relationship only. So, we can say that tree is a special case of graph.

:> Directed graph :
In directed graph each edge is represented by a directed pair(e1,r2) where e1 is tail and e2 is head. In directed graph (e1,e2) and (e2,e1) represents two different edges.

:> Undirected graph :
In undirected graph each edge is represented by same way as directed graph except here (e1,e2) and (e2,e1) represent same edge.

:> Path in a graph :
A path from any vertex U to vertex V is set of edges and vertices.

:> Cycle in a graph :
A cycle is a simple path in which source node and destination node are same.

:> Weighted graph :
In weighted graph each edge is assigned a value w(e) called weight or length of V. the weight of a path is sum of the weight of the edges in the path.

:> Graph representation :
Although several representation for graph are possible according
to nature of graph. But I am discussing only two representation
here.

1> Adjacency matrix.
2> Adjacency List.

> Adjacency matrix : In adjacency matrix we represent graph by
nxn matrix. Say i and j are vertices then if there is edge between
i and j, put 1 in matrix at position (i,j) otherwise 0.
eg.:
1 2 3 4
----------
1| 0 1 1 1
2| 1 0 1 1
3| 1 1 0 1
4| 1 1 1 0
Important note : For undirected graph the degree of any vertex i is sum of row. For directed graph the row sum is the out degree and column sum is the in-degree.

> Adjacency List : In this representation of graph, the n rows
of the adjacency matrix are represented as n linked lists.there
is one list for each vertex in G. Each node of the list, may store
a reference to the vertex corresponding to the end point of the edge.

>Graph Traversal :
There are two methods are available for graph traversal :
i)DFS (depth first search).
ii) BFS (Breadth first search ).
In DFS we visit child node first.
In BFS we visit same lavel node first then child node.

Monday, October 8, 2007

Common Errors during JAVA programing..........

Hi friends........
I have completed about one and half month at CDAC-B. In all those days I have done lot of programming in JAVA and DATA-STRUCTURE. During programming I found lots of compile time and run time errors. Because I was not familier with Java, so I was facing lot of difficulty during my initial days.Whenever I was getting an error I tried to solve by one of my friends. Today I want to discuss some common errors which I did all the times.
> 1 : Compile-time errors.......
During compilation compiler only checked syntax error. Compiler does not find the logical error.Compiler generate error massage for small mistake like semicolon,braces mismatch, checking int value in "IF" condition instead of boolean value, unbalanced parentheses, unclosed literals, illegal start of expression, not a statement, misspelling "else", cannot find symbol, is already defind, array required but....found, variable.....might not have been initialized, ....in...cannot be applied to..., operator.... cannot be applied to....., possible loss of precision, incompatible types, inconvertible types, missing return statement.., missing return value, cannot return a value from method whose return type is void, invalid method declaration....return type required, unreachable statement,non-static variable.....cannot be referenced from a static context, non-static method...cannot be referenced from a static contextm,
etc...
It's a long list of compiler errors which I got most of time. I am
giving some example which generated compiler error.
:> class ClassName{
void f(){
int n=10;
// Error, closing brace is missing
void g(){
int m=20;
}
}
:> if(i > j // error, unclosed parentheses
max = i // error, missing semicolon
else
max=j;
:> String myString=
" This is My First Java Programm "+
" and I got compilation error; // error, unclosed literal
:> int max;
..........
......
max; // error, missing =
:> if( i > j)
max = i;
els // error, else not spelled correctly
max = j;
:> boolean b=true;
int x = (int) b; // error, can't convert bpplean to int

> 2 : Runtime Errors......
When the JAVA interpreter encounters an error during runtime it throws an exception and prints a stack trace showing the call stack -the list of methods called from the main program untill the statement that caused the exception.
I am taking an example to clear concept....
:> class RunTimeTest{
public static void main(String arg[]){
String s = "Hello World";
System.out.println(s.substring(10,12);
}
}
Generated Error as:
Exception in thread "main"
java.lang.StringOutBoundException:
String index out of range: 12
at java.lang.String.substring(Unknown source)
at RunTimeTest.main(RunTimeTest.java:4)

other kind of runtime errors might also be possible are as....
> out of range :
> ArrayIndexOutOfRange
> StringIndexOutOfRange
> NullPointerException
> InputMismatchException
> IllegalFormatException
> NumberFormatException
> ArithmeticException : This exception will generate if we
divide any no. by Zero(0).
> outOfMemoryError
> StackOverFlowArea
> During execution of program sometimes we got error like
this : NoClassDefFoundError
> NoSuchMethodFoundError : main
this error is generated when we forget to write
public with main i.e.
void main(String arg[]){.....}

> 3 : Assignment and Equality......

> String equality
sometimes we forget to compared string with method "equals".
> Assignment of references ....
one important thing about assignment of references is
when we assign references it only assign reference not the content of object.

These are some common errors which I noticed from when I started programing in java.