Re: [algogeeks] Amazon written test question

2012-02-23 Thread HARISH S.C
Hi,
  Construct a BST with 2,1,3. If my understanding is right, now distance
between 2,3 will be 2. Will this algo return the correct answer?.

On Thu, Feb 2, 2012 at 1:43 PM, Manni mbd mbd2...@gmail.com wrote:

 Forget my previous post. it useless i think
 Firstly there will be only 1 node upwards which will be at a distance
 K units from the specified node.
 so we can take help of recursion

 int kthDistance(node *root, int k ,node *start){
 static node * kthUp = NULL;
 int distance = -1;
 if(node ==NULL) return -1;
 else if(node==Start) return 0;
 else{
 if(node-left){
 leftDepth = kthDistance(node-left);
 if(leftDepth=0)  distance = leftDepth+1;
 }
 if(node-right  distance0){
 rightDepth = kthDistance(node-right);
 if(rightDepth =0) distance = rightDepth+1;
 }
 if(distance ==k) kthUp = node;
 return distance;
 }
 .

 hope this helps

 On 2/1/12, atul anand atul.87fri...@gmail.com wrote:
  @Manni : didnt get your algo for upward nodes.
 
  On Wed, Feb 1, 2012 at 2:30 PM, Manni mbd mbd2...@gmail.com wrote:
 
  ^same as above..
  for upward.. start again from the nodes now distance is distance is
  (distance of start node -k) .. if you reach this from the root.. print
  it..
  also better is we use array rather than using linked list .. as
  sorting can be a tedious task in case of link lists !
 
  On 2/1/12, atul anand atul.87fri...@gmail.com wrote:
   if it is binary tree then to print the downward node...
   we can search for start node and then do level-order traversal or BFS
  from
   start node till distance K recursively.
  
   no as we want nodes to be printed in sorted order..what we do is
 crated
   a
   linked-list and insert nodes (found in above method) in sorted way.
   then print the linked list.
  
   for upward nodes. thinking...
  
   On Wed, Feb 1, 2012 at 9:52 AM, atul anand atul.87fri...@gmail.com
  wrote:
  
   are you sure given tree is binary tree and not BST.
   if it is BST then we can search start node and then do inorder
   traversal
   from there.
   before thinking printing abt upward node...please confirm if it a
   binary
   tree or BST.
  
  
   On Tue, Jan 31, 2012 at 9:27 PM, Dhirendra Singh dps...@gmail.com
  wrote:
  
  
   You are given a function printKDistanceNodes which takes in a root
   node
   of a binary tree, a start node and an integer K. Complete the
 function
  to
   print the value of all the nodes (one-per-line) which are a K
 distance
   from
   the given start node in sorted order. Distance can be upwards or
   downwards.
  
  
   anyone any idea ?? how to print nodes above the specified node,
  
   Note : we do not have a reference to parent
  
  
  
  
  
--
   You received this message because you are subscribed to the Google
  Groups
   Algorithm Geeks group.
   To post to this group, send email to algogeeks@googlegroups.com.
   To unsubscribe from this group, send email to
   algogeeks+unsubscr...@googlegroups.com.
   For more options, visit this group at
   http://groups.google.com/group/algogeeks?hl=en.
  
  
  
  
   --
   You received this message because you are subscribed to the Google
   Groups
   Algorithm Geeks group.
   To post to this group, send email to algogeeks@googlegroups.com.
   To unsubscribe from this group, send email to
   algogeeks+unsubscr...@googlegroups.com.
   For more options, visit this group at
   http://groups.google.com/group/algogeeks?hl=en.
  
  
 
  --
  You received this message because you are subscribed to the Google
 Groups
  Algorithm Geeks group.
  To post to this group, send email to algogeeks@googlegroups.com.
  To unsubscribe from this group, send email to
  algogeeks+unsubscr...@googlegroups.com.
  For more options, visit this group at
  http://groups.google.com/group/algogeeks?hl=en.
 
 
 
  --
  You received this message because you are subscribed to the Google Groups
  Algorithm Geeks group.
  To post to this group, send email to algogeeks@googlegroups.com.
  To unsubscribe from this group, send email to
  algogeeks+unsubscr...@googlegroups.com.
  For more options, visit this group at
  http://groups.google.com/group/algogeeks?hl=en.
 
 

 --
 You received this message because you are subscribed to the Google Groups
 Algorithm Geeks group.
 To post to this group, send email to algogeeks@googlegroups.com.
 To unsubscribe from this group, send email to
 algogeeks+unsubscr...@googlegroups.com.
 For more options, visit this group at
 http://groups.google.com/group/algogeeks?hl=en.



-- 
You received this message because you are subscribed to the Google Groups 
Algorithm Geeks group.
To post to this group, send email to algogeeks@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



Re: [algogeeks] FUNCTION POINTER IN C

2011-09-07 Thread HARISH S.C
Check this

http://andreinc.net/2010/09/30/generic-data-structures-in-c/

On Tue, Sep 6, 2011 at 10:02 PM, Puneet Ginoria punnu.gino...@gmail.comwrote:

 i am getting things in C++ but i need all this to be done in C.

 --
 You received this message because you are subscribed to the Google Groups
 Algorithm Geeks group.
 To post to this group, send email to algogeeks@googlegroups.com.
 To unsubscribe from this group, send email to
 algogeeks+unsubscr...@googlegroups.com.
 For more options, visit this group at
 http://groups.google.com/group/algogeeks?hl=en.


-- 
You received this message because you are subscribed to the Google Groups 
Algorithm Geeks group.
To post to this group, send email to algogeeks@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



Re: [algogeeks] Re: Stack problem

2011-09-07 Thread HARISH S.C
@Don:  given stack will be 20 1 3 1 5 1 6 1 2 1

Minimum Stack will be 20 1 1 1 1 1

After pop 1

min stack   20 1 1 1 1

pop 2

min stack 20 1 1 1 1

pop 1
min stack 20 1 1 1

pop 6
min stack 20 1 1 1

pop1
min stack 20 1 1

pop 5
min stack 20 1 1

pop 1
min stack 20 1

pop 3
min stack 20 1

pop 1

min stack 20

By this way we can minimize the memory occupied by minimum stack.
Pl let me know where i m going wrong

Regards,
S.C.Harish


On Tue, Sep 6, 2011 at 5:52 PM, Don dondod...@gmail.com wrote:

 in

-- 
You received this message because you are subscribed to the Google Groups 
Algorithm Geeks group.
To post to this group, send email to algogeeks@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



Re: [algogeeks] FUNCTION POINTER IN C

2011-09-06 Thread HARISH S.C
Hi,
   Google Template classes in c++ (or) generic classes in c++ you will get
lots of example

Regards,
S.C.Harish
Associate Software Engineer,
Cordys RD http://www.cordys.com/,
Hyderabad

On Mon, Sep 5, 2011 at 5:11 PM, kARTHIK R k4rth...@gmail.com wrote:

 For sending the type, you dont have to denote it explicitly. Use templates.

 templatetypename T void func (T *a) {
   // business logic

 }


 I dont think you can pass operators directly.
 For arithmetic operators, you could use something like this : [refer some
 site for exact syntax]

  templatetypename T1, typename T2 void functioname ( T1 *argument, T2
 operation) {

   T1 result = operation(argument[1] , argument[2]);

 }



 main() {

 int a[]={1,2,3,4,5};
 functioname(a, std::multiplierint());


 }

  Karthik R,
 RD Engineer,
 Tejas Networks.



 On Mon, Sep 5, 2011 at 11:52 AM, punnu punnu.gino...@gmail.com wrote:

 I have to pass a general array in a function whose type will also be
 passed and also a function pointer for  or .
 e.g.

 void function(type , type array, pointer for  or )

 how will you write it in C?

 Thanxx in Advance

 --
 You received this message because you are subscribed to the Google Groups
 Algorithm Geeks group.
 To post to this group, send email to algogeeks@googlegroups.com.
 To unsubscribe from this group, send email to
 algogeeks+unsubscr...@googlegroups.com.
 For more options, visit this group at
 http://groups.google.com/group/algogeeks?hl=en.


  --
 You received this message because you are subscribed to the Google Groups
 Algorithm Geeks group.
 To post to this group, send email to algogeeks@googlegroups.com.
 To unsubscribe from this group, send email to
 algogeeks+unsubscr...@googlegroups.com.
 For more options, visit this group at
 http://groups.google.com/group/algogeeks?hl=en.


-- 
You received this message because you are subscribed to the Google Groups 
Algorithm Geeks group.
To post to this group, send email to algogeeks@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



Re: [algogeeks] Re: Stack problem

2011-09-06 Thread HARISH S.C
Have a separate stack for minimum. While pushing, insert the number in
minimum stack only if the given number is less that or equal to the number @
the top of min stack. While removing, remove the value from min stack only
if its equal to the value thats popped.

-- 
You received this message because you are subscribed to the Google Groups 
Algorithm Geeks group.
To post to this group, send email to algogeeks@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



Re: [algogeeks] Admin of Group

2011-05-30 Thread HARISH S.C
+1

On Thu, May 26, 2011 at 9:31 PM, Ashish Patel ashishpatel1...@gmail.comwrote:

 +1000 ..dont count this as SPAM! :D

 On Thu, May 26, 2011 at 9:29 PM, radha krishnan 
 radhakrishnance...@gmail.com wrote:

 +100

 On Thu, May 26, 2011 at 9:26 PM, pacific :-) pacific4...@gmail.comwrote:

 +1


 On Wed, May 25, 2011 at 11:48 PM, anuj agarwal 
 coolbuddy...@gmail.comwrote:

 Hi,

 Are there any admins on this group? I recently joined this group and i
 liked the discussions going on here.

 But there is a problem which hurts is that unlike other groups which are
 moderated by certain admin guys (also active members of group), this one is
 not.
 So we are receiving lots of SPAMS. I guess no body wants to get a job
 from this group (specially ones which are sent by some Panzer).

 If the mods are reading this, Please take some action on that mails so
 that group will remain clean.

 Sorry for off topic.

 Anuj Agarwal
 Engineering is the art of making what you want from things you can get.

 --
 You received this message because you are subscribed to the Google
 Groups Algorithm Geeks group.
 To post to this group, send email to algogeeks@googlegroups.com.
 To unsubscribe from this group, send email to
 algogeeks+unsubscr...@googlegroups.com.
 For more options, visit this group at
 http://groups.google.com/group/algogeeks?hl=en.




 --
 regards,
 chinna.

  --
 You received this message because you are subscribed to the Google Groups
 Algorithm Geeks group.
 To post to this group, send email to algogeeks@googlegroups.com.
 To unsubscribe from this group, send email to
 algogeeks+unsubscr...@googlegroups.com.
 For more options, visit this group at
 http://groups.google.com/group/algogeeks?hl=en.


  --
 You received this message because you are subscribed to the Google Groups
 Algorithm Geeks group.
 To post to this group, send email to algogeeks@googlegroups.com.
 To unsubscribe from this group, send email to
 algogeeks+unsubscr...@googlegroups.com.
 For more options, visit this group at
 http://groups.google.com/group/algogeeks?hl=en.


  --
 You received this message because you are subscribed to the Google Groups
 Algorithm Geeks group.
 To post to this group, send email to algogeeks@googlegroups.com.
 To unsubscribe from this group, send email to
 algogeeks+unsubscr...@googlegroups.com.
 For more options, visit this group at
 http://groups.google.com/group/algogeeks?hl=en.


-- 
You received this message because you are subscribed to the Google Groups 
Algorithm Geeks group.
To post to this group, send email to algogeeks@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



Re: [algogeeks] Link list Problem

2011-03-16 Thread HARISH S.C
Its a standard question and balaji's approach has been accepted as the best
possible solution.

@Krace: In the list 1-2-3-4-5, If address of 3 is the only known value 
if u want to delete 3 from the list, this wont work.

-- 
You received this message because you are subscribed to the Google Groups 
Algorithm Geeks group.
To post to this group, send email to algogeeks@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



Re: [algogeeks] give answer

2011-03-16 Thread HARISH S.C
I am sure if you google it , u can find many points.

Abstract classes n interface wont have any object on its own.

Abstract class acts base class during inheritance.

Interface contains a predefined layout for a class.

In abstract class, we can define what a function should do whereas in
interface, we can not define what a function should do.

While inheriting(or implementing) there is no need to override all the
functions in a abstract class but in case of interface, you need to override
all the functions.

In C++, we dont have the concept of interface. But we can indirectly
implement it by having all the methods in ur class as pure virtual
functions.

In java, we have a separate concept called interface which is used to
indirectly implement multiple inheritance.We can inherit abstract class
whereas interface can only be implemented.


On Fri, Mar 11, 2011 at 8:32 AM, Praveen praveen200...@gmail.com wrote:

 plz refer head first java


 On Thu, Mar 10, 2011 at 11:36 PM, nishaanth nishaant...@gmail.com wrote:

 Abstract classes can have non abstract methods. Derived classes must
 implement the abstract methods.

 But Interfaces have only abstract method definitions. Implementing classes
 must implement all the method definitions in the interface.





 On Thu, Mar 10, 2011 at 11:13 PM, LALIT SHARMA lks.ru...@gmail.comwrote:

 google it 


 On Thu, Mar 10, 2011 at 10:49 PM, Sudhir mishra 
 sudhir08.mis...@gmail.com wrote:

 Ques: What is Abstract Classes?
 Ques:What is interfaces?
 Ques:What is difference between abstract classes and interfaces?
 Ques:Give an example where do you use interfaces and abstract classes?

 --
 You received this message because you are subscribed to the Google
 Groups Algorithm Geeks group.
 To post to this group, send email to algogeeks@googlegroups.com.
 To unsubscribe from this group, send email to
 algogeeks+unsubscr...@googlegroups.com.
 For more options, visit this group at
 http://groups.google.com/group/algogeeks?hl=en.




 --
 Lalit Kishore Sharma,

 IIIT Allahabad (Amethi Capmus),
 6th Sem.

 --
 You received this message because you are subscribed to the Google Groups
 Algorithm Geeks group.
 To post to this group, send email to algogeeks@googlegroups.com.
 To unsubscribe from this group, send email to
 algogeeks+unsubscr...@googlegroups.com.
 For more options, visit this group at
 http://groups.google.com/group/algogeeks?hl=en.




 --
 S.Nishaanth,
 Computer Science and engineering,
 IIT Madras.

 --
 You received this message because you are subscribed to the Google Groups
 Algorithm Geeks group.
 To post to this group, send email to algogeeks@googlegroups.com.
 To unsubscribe from this group, send email to
 algogeeks+unsubscr...@googlegroups.com.
 For more options, visit this group at
 http://groups.google.com/group/algogeeks?hl=en.




 --
 B. Praveen

  --
 You received this message because you are subscribed to the Google Groups
 Algorithm Geeks group.
 To post to this group, send email to algogeeks@googlegroups.com.
 To unsubscribe from this group, send email to
 algogeeks+unsubscr...@googlegroups.com.
 For more options, visit this group at
 http://groups.google.com/group/algogeeks?hl=en.


-- 
You received this message because you are subscribed to the Google Groups 
Algorithm Geeks group.
To post to this group, send email to algogeeks@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



Re: [algogeeks] Link list Problem

2011-03-16 Thread HARISH S.C
Now u know 3's address. So copy the content of next node, say 4. Now you
have 1-2-3-4-4-5. Now delete the next node. So now we have
1-2-3-4-5-. Which means 3 has been deleted.

On Wed, Mar 16, 2011 at 6:37 PM, kracekumar ramaraju 
kracethekingma...@gmail.com wrote:

 .

-- 
You received this message because you are subscribed to the Google Groups 
Algorithm Geeks group.
To post to this group, send email to algogeeks@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



Re: [algogeeks] Re: 10 digit problem

2011-03-16 Thread HARISH S.C
Hi its number of zeros following it or no of 0s immediately after it.

On Wed, Mar 16, 2011 at 7:07 PM, HARISH S.C s.c.har...@gmail.com wrote:

 The best answer I can come up with is 9
  503000 (or) 90

 On Mon, Mar 14, 2011 at 1:37 PM, bittu shashank7andr...@gmail.com wrote:

 i don't think another answer 50 is best answer according to
 your constraints
 may sum1 else can think but i found its correct

 Thanks
 Shashank

 --
 You received this message because you are subscribed to the Google Groups
 Algorithm Geeks group.
 To post to this group, send email to algogeeks@googlegroups.com.
 To unsubscribe from this group, send email to
 algogeeks+unsubscr...@googlegroups.com.
 For more options, visit this group at
 http://groups.google.com/group/algogeeks?hl=en.




-- 
You received this message because you are subscribed to the Google Groups 
Algorithm Geeks group.
To post to this group, send email to algogeeks@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



Re: [algogeeks] Re: Microsoft Written test questions required

2011-03-13 Thread HARISH S.C
@Akshata
Hi Sorry for late reply. Amrita School Of Engineering,Coimbatore

On Sun, Feb 13, 2011 at 10:04 AM, Akshata Sharma
akshatasharm...@gmail.comwrote:

 @harish:
 which college?

 --
 You received this message because you are subscribed to the Google Groups
 Algorithm Geeks group.
 To post to this group, send email to algogeeks@googlegroups.com.
 To unsubscribe from this group, send email to
 algogeeks+unsubscr...@googlegroups.com.
 For more options, visit this group at
 http://groups.google.com/group/algogeeks?hl=en.



-- 
You received this message because you are subscribed to the Google Groups 
Algorithm Geeks group.
To post to this group, send email to algogeeks@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



Re: [algogeeks] Re: Microsoft Written test questions required

2011-02-12 Thread HARISH S.C
We had MS interview on 22nd jan.Written test was very easy. We had 2
technical question

1.Convert an decimal integer to binary string(10 marks)
2.sort a doubly linked list(5 marks)

2 very easy apti question for 5 marks like there are 20 people in party.
each one shakes hand with others twice, then how many hand shakes were
there,etc.

2 DBMS question. They are choose the best for 1 mark each. A query for 3
marks.

answers to following questions are what matters a lot

1. U r watching an inp. cricket match.Suddenly the tv goes blank. Write the
steps u ll take to find the fault(5 marks)
2. Due to fog, airplanes were unable to land and were circling the airport.
Few airplanes are about to run out of fuel, what are the short term and log
term measures you will take.(5 Marks)
3.Write test cases for a car(10 Mark)
4. You are the administrator of a server which carries sensitive information
abt the company. What are the possible attacks and how will you prevent
it.(5 marks)


They tested how u think more than your technical skill when they came to our
college. Be ready to answer some puzzles. They will give a lot of importance
to your GPA during final interview process

All the best !!

Regards,
S.C.Harish

On Thu, Feb 3, 2011 at 3:56 PM, Avik Mitra tutai...@gmail.com wrote:

 Try to solve GATE question papers on data structures, tress DBMS and
 OS. Also try to solve exploring C.

 --
 You received this message because you are subscribed to the Google Groups
 Algorithm Geeks group.
 To post to this group, send email to algogeeks@googlegroups.com.
 To unsubscribe from this group, send email to
 algogeeks+unsubscr...@googlegroups.com.
 For more options, visit this group at
 http://groups.google.com/group/algogeeks?hl=en.



-- 
You received this message because you are subscribed to the Google Groups 
Algorithm Geeks group.
To post to this group, send email to algogeeks@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



Re: [algogeeks] Microsoft Written test questions required

2011-02-12 Thread HARISH S.C
They also asked us to find the output of 2 C pgm involving pointers for 5
marks.

On Wed, Feb 2, 2011 at 3:04 PM, Ricky rajeevpo...@gmail.com wrote:

 Hi Guys,

 I want to know about questions asked in written test for Microsoft.
 I come to know that it will be for 1.5 hours and it will consists of
 questions from c,C++ and data structure. I am writing the test this
 weekend only. So please send me questions ASAP.

 --
 You received this message because you are subscribed to the Google Groups
 Algorithm Geeks group.
 To post to this group, send email to algogeeks@googlegroups.com.
 To unsubscribe from this group, send email to
 algogeeks+unsubscr...@googlegroups.com.
 For more options, visit this group at
 http://groups.google.com/group/algogeeks?hl=en.



-- 
You received this message because you are subscribed to the Google Groups 
Algorithm Geeks group.
To post to this group, send email to algogeeks@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



Re: [algogeeks] Re: Amazon Written Tes Q1

2011-02-01 Thread HARISH S.C
n be the minimum value in the list
m be the maximum value in the list

Have an array C[m-n]
Initialize C to zero.
now

Node *node=head;
while(node!=NULL)
{
 C[node-info-n]++;
}

now using the array C,create a sorted list.

Since we are using doubly linked list,we might have some other better
solution. I had this question in my Microsoft interview and the interviewer
was satisfied with this answer.

-- 
You received this message because you are subscribed to the Google Groups 
Algorithm Geeks group.
To post to this group, send email to algogeeks@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



Re: [algogeeks] Re: Amazon Written Tes Q1

2011-02-01 Thread HARISH S.C
sorry in above solution add node=node-next in while loop

On Wed, Feb 2, 2011 at 1:05 AM, HARISH S.C s.c.har...@gmail.com wrote:

 n be the minimum value in the list
 m be the maximum value in the list

 Have an array C[m-n]
 Initialize C to zero.
 now

 Node *node=head;
 while(node!=NULL)
 {
  C[node-info-n]++;
 }

 now using the array C,create a sorted list.

 Since we are using doubly linked list,we might have some other better
 solution. I had this question in my Microsoft interview and the interviewer
 was satisfied with this answer.




-- 
You received this message because you are subscribed to the Google Groups 
Algorithm Geeks group.
To post to this group, send email to algogeeks@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



[algogeeks] Microsoft interview question

2011-02-01 Thread HARISH S.C
We have a text editor application where we can choose 1)between 100s of
different fonts like arial,calibri,etc.. 2)different text sizes 3) different
formatting such as bold, Italics,regular,etc..

Imagine that the application is similar to word(there we will have these
options). Now give different test cases to test this application. I came up
with different solutions but interviewer is not satisfied,

-- 
You received this message because you are subscribed to the Google Groups 
Algorithm Geeks group.
To post to this group, send email to algogeeks@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



Re: [algogeeks] Microsoft interview question

2011-02-01 Thread HARISH S.C
@Sarma : He said we should finish testing within 2 days.

@Gene: I said the same answer but he said its ok for size but for font it
will not work because style of each and every font will differ and he said
doing exhaustive test for all fonts is not a solution too.

On Wed, Feb 2, 2011 at 7:38 AM, Sarma Tangirala
tvssarma.ome...@gmail.comwrote:

 How many test cases were you expected to give?

 I think one problem you will have is rendering a font on different sizes.

 A generic test case could be, randomly pick a font and format and then
 alternate between a few extremes of the font size range and check if they
 look the same.

 Another kind of test case would be to randomly take text from the Web and
 check if you editor is able to identify and render it the same way. You are
 essentially seeing if your editor is also good at identifying fonts.

 What were your test cases?

 Sent from my BlackBerry
 --
 *From: * HARISH S.C s.c.har...@gmail.com
 *Sender: * algogeeks@googlegroups.com
 *Date: *Wed, 2 Feb 2011 01:14:00 +0530
 *To: *algogeeks@googlegroups.com
 *ReplyTo: * algogeeks@googlegroups.com
 *Subject: *[algogeeks] Microsoft interview question

 We have a text editor application where we can choose 1)between 100s of
 different fonts like arial,calibri,etc.. 2)different text sizes 3) different
 formatting such as bold, Italics,regular,etc..

 Imagine that the application is similar to word(there we will have these
 options). Now give different test cases to test this application. I came up
 with different solutions but interviewer is not satisfied,

 --
 You received this message because you are subscribed to the Google Groups
 Algorithm Geeks group.
 To post to this group, send email to algogeeks@googlegroups.com.
 To unsubscribe from this group, send email to
 algogeeks+unsubscr...@googlegroups.comalgogeeks%2bunsubscr...@googlegroups.com
 .
 For more options, visit this group at
 http://groups.google.com/group/algogeeks?hl=en.

 --
 You received this message because you are subscribed to the Google Groups
 Algorithm Geeks group.
 To post to this group, send email to algogeeks@googlegroups.com.
 To unsubscribe from this group, send email to
 algogeeks+unsubscr...@googlegroups.comalgogeeks%2bunsubscr...@googlegroups.com
 .
 For more options, visit this group at
 http://groups.google.com/group/algogeeks?hl=en.


-- 
You received this message because you are subscribed to the Google Groups 
Algorithm Geeks group.
To post to this group, send email to algogeeks@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



Re: [algogeeks] Amazon Written Tes Q1

2011-01-31 Thread HARISH S.C
If space is not a constrain, try to do it using count sort
http://en.wikipedia.org/wiki/Counting_sort

Regards,
S.C.Harish

On Sun, Jan 30, 2011 at 6:10 PM, bittu shashank7andr...@gmail.com wrote:

 Sort the Doubly Linked List..In Minim time complexity...is it possible
 to sort doubly linked list in O(n)..can some one
 provide..tutorial ,code or algo fro thiswhen u will fright with
 with amazon..you will see this question..as it is..so try it now..

 Thanks
 Shashank

 --
 You received this message because you are subscribed to the Google Groups
 Algorithm Geeks group.
 To post to this group, send email to algogeeks@googlegroups.com.
 To unsubscribe from this group, send email to
 algogeeks+unsubscr...@googlegroups.comalgogeeks%2bunsubscr...@googlegroups.com
 .
 For more options, visit this group at
 http://groups.google.com/group/algogeeks?hl=en.



-- 
You received this message because you are subscribed to the Google Groups 
Algorithm Geeks group.
To post to this group, send email to algogeeks@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.