Monday, January 11, 2010

Some random thoughts

Sometimes I wonder can right be an absolute term? What we think is right can actually be wrong isn't it? Is there any way we can be absolutely sure of something? And even if we know that something is right do we always choose to do it? Why not? Why do we want to do so many things even though we know they are not right?
If you are having two battles in yourself, as some crazy people call it fight between heart and brain, which should win? Which one of mind and heart is actually right? Is it the same one which makes choice which makes us happy? If something makes us happy isn't it right? What if the thing we believe is right, doesn't make us happy? Is that thing still right?
Should emotions be allowed to affect your judgment? After all that is what makes us human isn't it? How can we ignore them? Should we ignore them? But then shall we be human anymore? Shall we be happy by ignoring our own emotions, suppressing them, pretending they don't exist or pretending not to care for them.
Well in any case life just goes on doesn't it?

Should we just ignore them? What should be the things which should make us happy? Should that be materialistic? If yes, why? How do we decide which things make us happy? How do we even know what happiness is? How do we choose which things make us happier?

Life never stops but there are just few things which make our lives better easier, which make us happier. Should we just ignore few of them for others?

Regards,
Ashish


Tuesday, 22 January 2010, 13:00:00

Sunday, January 10, 2010

Things to be revised before an interview

I am making a list of things which I believe are helpful to be revised before appearing for an interview for a good software company.

Data Structures
------------------
linked list,binary tree, heap,hashmap :- all types of questions and also be prepared to write code in C if asked

Algorithms:-
Searching algorithms
Sorting algorithms
Graph algorithms :- BFS,DFS, shortest path Bellman ford, dikstra, minimum spanning tree prim's, kruskal's algorithm etc
String algorithms

C
-----
Pointers, memory allocation
Proper usage of pointers and when to avoid them
Activation Records
function pointers
understand about linking and compiling


C++
----------
advantage of C++ over C
proper use of const key word
Be clear when we need to pass object with reference and when avoid passing with reference

templates
a bit about stl
auto pointers

Java
--------
java inheritance
inner classes
hashmap
collections
threading :- concurent apis, synchronization, old way
sockets
jsps, servlets
spring framework


I will keep on adding to this list more.


Regards,
Ashish

Tuesday, January 05, 2010

Two numbers in set whose sum is equal to a given number

Approach 1 O(N^2) :- Try summing each number in array with all other numbers in array and if the sum is equal to given number return true. This approach in worst case will be O(n^2). In best case we can be lucky to have first two numbers in array to be such that their sum is equal to a given number.

Approach 2 O( n Log n) : Sort the numbers. Now keep two pointers one at start and one at end. pseudo code can be something as below. I havent tested this code so bear with me if it has some syntax error :)

bool checksum(int sortedArray[], int len, int required_sum)
{
int start = 0;
int end = len-1;

while(start < end)
{
if((sortedArray[start]+sortedArray[end])>required_sum)
{
end = end -1;
continue;
}

if((sortedArray[start]+sortedArray[end])<required_sum)
{
start = start +1;
continue;
}

else return true;

}

}
--
Ashish Meena

Sunday, January 03, 2010

Good by 2009, Welcome 2010

One more year of our lives just passed. This time it was called 2009. Lets me just try to summarize things which happened to me in 2009.
Well lets start with professional life, I started working in Equity Infrastructure team at MS. I spent around 3 months there, later I moved to private wealth management. Since then I have been working here. I have worked on a few nice projects like caching system, swaps introduction. I have got promoted to Senior Associate from Associate. Well to summarize nothing much has changed at the job. Off course this has been practically first year which I spent working. Lets also just recollect things which I have learned this year, well I have learned quite a lot about office culture, and lots of practical things which I am going to cherish life long. Technically this year I havent improved my skills the way I could have, I am planning to do that in 2010 now.

Ok, lets start with personal life. Nothing has changed (and I cant express how Happy and content I am for this). One more comfort this year has been that I am able to afford some money for things which I want to do. I also have started to pay a slight attention to myself. 2009 was the year where I started to buy clothes for myself and actually put a lot of effort in trying to select them. Now lets come to what have I learned this year. Hmm, when it comes to personal life experiences I off course wont share with you all on a blog :P, but yes I can say I am getting mature pretty fast now and soon I will have wisdom of a grandpa :)

To summarize I can say 2009 has been an year where I have had very few ups and downs. To be honest this is the best thing in life that nothing happens and life just continues peaceful just like 2009. Good bye 2009, you have been a great year for me where I have not lost anything.

Now it is time to welcome 2010 also. I wish 2010 turns out to be a great year as well. People, I am not going to write down my resolutions over here so that nobody can point out if I fail them :P. Welcome 2010.


Regards,
Ashish Meena

--------------------------------------------------
Tuesday, 5 January 2010, 11:00:00