Monthly Archives: March 2014

Javascript Tricky Questions

Q) What does “1”+2+4 evaluate to? Ans: Since 1 is a string, everything is a string, so the result is 124. Q) What does 3+4+”7″ evaluate to? Ans: Since 3 and 4 are integers, this is number arithmetic, since 7 … Continue reading

Posted in Javascript | Leave a comment

Some Javascript Questions

Global Variables: The var keyword is used to declare a local variable or object, while omitting the var keyword creates a global variable. Types in Javascript: JavaScript is a loosely-typed language (some call this weakly typed); this means that no … Continue reading

Posted in Javascript | Leave a comment

Sorting Algorithms

1) Merge Sort – O(n log n) comparison based sorting algorithm (best case, worst case, avg case) – Produces a stable sort (implementation preserves the input order of equal elements in the sorted output) – Top Down Implementation and Bottom … Continue reading

Posted in General | Leave a comment

Must Know Algorithms

As per Cracking the Coding Interview: Data Structures Linked Lists Binary Trees Tries Stacks Queues Vectors/ArrayLists Hash Tables Algorithms Breadth First Search Depth First Search Binary Search Merge Sort Quick Sort Tree Insert/Find/etc Concepts Bit Manipulation Singleton Design Pattern Factory … Continue reading

Posted in Interview Questions | Leave a comment

Design Patterns

In software engineering, a design pattern is a general repeatable solution to a commonly occurring problem in software design. A design pattern isn’t a finished design that can be transformed directly into code. It is a description or template for … Continue reading

Posted in General | Leave a comment

Software Architect Interview Questions

What do you understand from the word Architecture? What is meant by software Architecture? What kind of Software Architecture have you designed till now? Can you explain with the help of commands and patterns? Which kind of design patterns have … Continue reading

Posted in Interview Questions | Leave a comment

Interview Questions for Software Architects

Eleven Interview Questions for Software Architects http://news.dice.com/2011/01/07/eleven-interview-questions-for-software-architects/

Posted in Interview Questions | Leave a comment

Finding if a string occurs in another string

Options: 1) strpos 2) strstr If you only want to determine if a particular needle occurs within haystack, use the faster and less memory intensive function strpos() instead of strstr. For case insensitive queries, use stripos and stristr strstr: Returns … Continue reading

Posted in PHP | Leave a comment

Different types of errors in PHP

There are three basic types of runtime errors in PHP: 1. Notices: These are small, non-critical errors that PHP encounters while executing a script – for example, accessing a variable that has not yet been defined. By default, such errors … Continue reading

Posted in PHP | Leave a comment