Difference between revisions of "Interview Questions"
From Hawk Wiki
(→C/C++) |
(→PHP) |
||
Line 18: | Line 18: | ||
==PHP== | ==PHP== | ||
− | + | [[PHP interview]] | |
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
==Swap 2 numbers in one line== | ==Swap 2 numbers in one line== |
Revision as of 23:08, 3 April 2012
Contents
Some Translation
n! Multiplicative
Object-oriented programming
Check here Interview_Questions(OOP)
C++ Interview
Javascript/Jquery
Algorithm Interview Problems
Algorithm Problems
All about Binary search tree
All about Linked List
Heap & Heap Sort
Regular Expression
http://www.zytrax.com/tech/web/regex.htm
PHP
Swap 2 numbers in one line
//swap $a=10; $b=20; $a=$a+$b-($b=$a); echo $a." and ". $b."\n"; // output 20 and 10 $a^=$b^=$a^=$b; //This has a bug. You cannot do things like this $a^=$a^=$a^=$a echo $a." and ". $b; //output 10 and 20
Calculate degree between hour and minute hand
<?php $time=array(); $time['h']=12; $time['m']=15; $time['s']=30; function clockDegree($time){ $mPercent=((float)$time['m']+((float)$time['s']/60.0))/60.0; $mDegree=$mPercent*360; $hdegree=((int)$time['h']%12+(float)$mPercent)/12.0*360; echo abs($mDegree-$hdegree); } clockDegree($time);