[algogeeks] PRAYATNA '12 - A NATIONAL LEVEL TECHNICAL SYMPOSIUM

2012-02-07 Thread sivaviknesh s
-- Forwarded message --
From: Harikannan Shanmugam 
Date: Tue, Feb 7, 2012 at 5:37 PM
Subject: Fwd: PRAYATNA '12 - A NATIONAL LEVEL TECHNICAL SYMPOSIUM
To: ananth...@gmail.com, arivu04@gmail.com, aru.valarpu...@gdit.com,
aru.valarpu...@gmail.com, cccha...@gmail.com, cserebels_...@googlegroups.com,
dharnee.tha...@gmail.com, fathimasof...@ymail.com,
g.d.dharaneetha...@gmail.com, gokilavarthan...@gmail.com,
gokilavas...@gmail.com, gowthams...@gmail.com, gsivagurunat...@inautix.co.in,
janani_...@yahoo.in, jayaprakash_star1...@yahoo.com, spgo...@hotmail.com,
ts.assignm...@gmail.com, Aru Valarpuram , arul
Kumar , arunkumar shanmugam , ashok
kumar , Avinash Radhakrishnan <
avinash.radhakrish...@gmail.com>, bharathimit15 ,
Boobal Subramaniyam , Bosco Anandraj <
boscoanand...@gmail.com>, Chandra Sekar Narayanan <
007.chandru.v...@gmail.com>, deeps1991 ,
Dharaneetharan G D , ganesh margabandu <
gan.mi...@gmail.com>, "gnanavelu...@gmail.com" ,
Gowtham Venkataraman , hari harish <
harid...@gmail.com>, harikannan shanmugam ,
Inba G , "joyarunraj.20" ,
KarthicK S , karthikeyan A <
quickslver2...@gmail.com>, "kncr...@gmail.com" ,
ksprakash1990 , lokesh lokesh <
lokeshmit@gmail.com>, lokesh lokesh ,
Madhu R , mayupath , mitcse08info
, nandhakumarr03 ,
Navin G V , PAZHANI RAJAN ,
Prabhu Ravichandran , prakashdharmaraj <
prakashdharma...@gmail.com>, Prasanna Kumar ,
prasanth kumar , "ra.aravind18" <
ra.aravin...@gmail.com>, ramash4647 , "S.Gokul
Kannan" , Sagar Gahuri , sathishpp
jec , sathiya prakash ,
"shankar15.gow" , Shikhar Goel <
shikhar1...@gmail.com>, siva viknesh , sudhir kumar
, "Tamil selvan R.S" ,
Tariq Ibrahim , Thamizharasu Kannazhagan <
thamizhkar...@gmail.com>, "v.vengadesh17" , Vel
Murugan , vimalrkambat , Vinodh M
, Yogeshwaran Harikrishnan 




-- Forwarded message --
From: Association of Computer Technology MIT,Anna University,Chennai <
a...@mitindia.edu>
Date: 7 February 2012 14:48
Subject: PRAYATNA '12 - A NATIONAL LEVEL TECHNICAL SYMPOSIUM
To: guruv...@gmail.com, gutsve...@gmail.com, gv.vick...@gmail.com,
gvjilavar...@gmail.com, gvnavi...@gmail.com, h2010...@bits-pilani.ac.in,
haleemullah2...@gmail.com, hamir...@yahoo.co.in,
haranivaithianat...@yahoo.com, haricdm1...@gmail.com, hariha...@cheerful.com,
harikannan.mi...@gmail.com, harikrishnan...@gmail.com, harini1...@gmail.com,
harini...@gmail.com, hari...@gmail.com, harish.mi...@gmail.com,
harish.mit...@gmail.com, harishsmar...@yahoo.co.in, harishz...@gmail.com,
hariyogi.1...@yahoo.in, hari_krishc...@yahoo.in, harrishsm...@gmail.com,
hasind...@gmail.com






*PRAYATNA '12 - IMAGINATION TENDS TO INFINITY
*

Hi ,

  We, the members of The Association of Computer
Technologists,
Department of Computer Technology, Anna University
, MIT campus  take great pride in announcing and
conducting our National Level Technical Symposium, *Prayatna
'12
* on *Mar 2 & 3.* It is held to commemorate yesterday's advances, further
tomorrow's achievements. This is where smartness meets swords. Students
from various reputed institutions will flock to take part in this event.
In a nutshell, PRAYATNA '12 churns the technical knowledge of
upcoming engineers by testing their aptitude in programming, designing ,
problem-solving and quizzing concepts related to multifaceted domain.To
increase the talent pool and overcome the technical divide, Special
Workshops will be organised for the participants. Advancing through the
oceans of knowledge, we are back with multifarious designs, innovative
ideas, immense passion , philanthropic challenges and up-to-date
technologies . The chase to become the brightest and the smartest among
various intellectual groups continues and the dreams to become the ubergeek
are reinstalled.
 We proudly present Prayatna '12 ( a Prayatna '11 ++ ) with lots of
challenging online
 events ,exciting
technical
 / 
creative
 onsite events and workshops
 conducted by reputed organisations on currently developing fields like
Cloud Computing, Android OS etc. We also show our gratitude to all the
participants and staff member who showed their presence last year through
which Prayatna '11 attained its actual position. We are expecting the same
support and brilliant participation this year also from most of the student
community.

   The *Online Events* to be conducted are :


   1. Online Programming Contest - Xecute
   2. Mobile Applications Development - Fonefrenzzy-  Themes are given
   already. Send your creative apps soon.
   3. Crack the Codex
   4. Bread,Butter and Brain
   5. Desparado
   6. Olympiact

 

[algogeeks] My symantec interview experiences

2011-10-04 Thread sivaviknesh s
Hope it will be useful :)

-- 
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.



Symantec Interview experiences_siva.docx
Description: application/vnd.openxmlformats-officedocument.wordprocessingml.document


[algogeeks] os ques about paging

2011-09-24 Thread sivaviknesh s
Consider a virtual memory system in which the virtual page addresses are
mapped onto physical page addresses as follow
Virtual page address.. Physical page address
03
12
2...1
The address of any byte in this system is given by the ordered pair (v,d)
where v = virtual page address d = byte offset in the page
Assuming that the main memory is capable of holding 4 page frames, what is
the physical address of a byte having the virtual address (0,512) given that
the page size is 1024 bytes?
a) 3584
b) 2560
c) 1536
d) 512
e) 1024


-- 
Regards,
$iva

-- 
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] Amazon OS question

2011-09-24 Thread sivaviknesh s
A parallel program consists of 8 tasks – T1 through T8. Each task requires
one time step to be executed on a single processor. Let X -> Y denote the
fact that task X must be executed before task Y is executed. Suppose only
the tasks X, Y are to be executed. On any multiprocessor machine it would
require at least 2 time steps since in the first step X could be executed,
and Y could be executed in the next time step (since it requires X to
complete first). Now, suppose the following dependencies exist between the
tasks T1 – T8:

T1 -> T2

T2 -> T3

T3 -> T6

T2 -> T4

T4 -> T7

T2 -> T5

T5 -> T8

What is the minimum number of time steps required to execute these 8 tasks
on a 2 processor machine and a 4 processor machine?

a)4 & 2

b)5 & 2

c)5 & 4

d)6 & 2


-- 
Regards,
$iva

-- 
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] Time complexity

2011-09-21 Thread sivaviknesh s
for(i=0;ihttp://groups.google.com/group/algogeeks?hl=en.



[algogeeks] Array ques based on correlation factor

2011-09-17 Thread sivaviknesh s
Write a method fill up an array of size n - and returns the array to the
caller - with the following conditions

1. the numbers shud be between 0 to n-1
2. no repeated numbers
3. the method should have a deterministic time to fill the arrays
4. arrays returned from the method should have low-correlation factor

...btw what does 4 th point mean? what is a correlation factor?? Plz provide
code and explain...


-- 
Regards,
$iva

-- 
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] How one can measure time spent in context switch??

2011-09-17 Thread sivaviknesh s
if possible code plz

-- 
Regards,
$iva

-- 
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] Symantec System programming ques

2011-09-17 Thread sivaviknesh s
you have to write a program which tell about how many times it has run. ex:

if you run first time it will print 1.
if you run second time it will print 2.
like this.

this can easily done by File Handling but think other solution like IPC.

after booting your system, your program's output start from 1

answers plz???


-- 
Regards,
$iva

-- 
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] Symantec ques - Find maximum element without using comparison operators

2011-09-17 Thread sivaviknesh s
Two registers A and B. Initial Contents of the registers are unknown.
Write a program to find MAXINT - The maximum positive unsigned integer
The instructions available are:
SHR reg1, op1
ADD reg1, op1
AND reg1, op1
NOT reg1.
Op1 may represent any number or register.
(Hint: The Shift operation is a logical shift, not arithmetic shift.)

..solution plz .. i tried but unable to arrive

-- 
Regards,
$iva

-- 
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] Fwd: ThoughtWorks Programming Questions

2011-09-15 Thread sivaviknesh s
-- Forwarded message --
From: LOKE$[-] 
Date: Mon, Aug 22, 2011 at 4:13 PM
Subject: Fwd: ThoughtWorks Programming Questions
To: mitcse08info 



With regards

Lokesh Chandrakumar







-

Hi ,

Attached are the links to the *ThoughtWorks programming questions* and
solutions.
 *
*
*First link contains the Programming questions asked in CIT yesterday.*

Make use of it. All the best


http://www.mail-archive.com/algogeeks@googlegroups.com/msg24892.html


http://code.pavankumar.info/archives/131


http://www.crazyengineers.com/forum/ce-careers-jobs-higher-education/45955-thought-works-placement-papers-campus-selection-process.html












-- 
Regards,
$iva

-- 
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] Fwd:

2011-09-15 Thread sivaviknesh s
-- Forwarded message --
From: sivaviknesh s 
Date: Fri, Sep 9, 2011 at 12:28 PM
Subject:
To: Pritpal Singh 



Interview Questions: Thoughtworks
As said by senior- S.Abhinaya

Round1:
Logic test- some simple numerical problems.This doesn't require any special
preparation. Try to answer all the questions.

Round2: Coding
U ll be asked to write program for a given prob using oops concepts. (They
ll give more importance to the oops concepts used rather than the data
structures used)

Round 3,4,5: Technical Interview
Questions ll be from datastructures , OOPS and ur area of interest.
HR questions ll be like, what are the technical blogs u ‘ve read, etc..,

Final Round:
General Aps: 50 simple ques ll be given. This is to test ur speed.



Common Questions asked:
Mars rover problem
Income tax problem
-- 
Regards,
$iva




-- 
Regards,
$iva

-- 
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] Fwd: ThoughtWorks Programming Questions

2011-09-15 Thread sivaviknesh s
-- Forwarded message --
From: Sesha krishnan 
Date: Mon, Aug 22, 2011 at 6:04 PM
Subject: Re: ThoughtWorks Programming Questions
To: mitcse08i...@googlegroups.com


All,
 We uploaded the thoughtworks interview questions from GCT yesterday @
http://yourbitsandbytes.com/viewforum.php?f=56

Thoughtworks visited GCT a week or 2 ago.
Good luck.


On Mon, Aug 22, 2011 at 6:43 AM, LOKE$[-] wrote:

>
> With regards
>
> Lokesh Chandrakumar
>
>
>
>
>
>
>
> -
>
> Hi ,
>
> Attached are the links to the *ThoughtWorks programming questions* and
> solutions.
>  *
> *
> *First link contains the Programming questions asked in CIT yesterday.*
>
> Make use of it. All the best
>
>
> http://www.mail-archive.com/algogeeks@googlegroups.com/msg24892.html
>
>
> http://code.pavankumar.info/archives/131
>
>
>
> http://www.crazyengineers.com/forum/ce-careers-jobs-higher-education/45955-thought-works-placement-papers-campus-selection-process.html
>
>
>
>
>
>
>
>
>
>


-- 
yourbitsandbytes.com



-- 
Regards,
$iva

-- 
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] Fwd: Interview question in Thoughtworks

2011-09-15 Thread sivaviknesh s
-- Forwarded message --
From: sivaviknesh s 
Date: Fri, Sep 9, 2011 at 12:23 PM
Subject: Fwd: Interview question in Thoughtworks
To: Pritpal Singh 




-- Forwarded message --
From: sasi kumar 
Date: Sat, Jul 23, 2011 at 12:04 PM
Subject: Fwd: Interview question in Thoughtworks
To: sivavikne...@gmail.com


-- Forwarded message --
From: sasi kumar 
Date: 15 July 2011 23:21
Subject: Interview question in Thoughtworks
To: cseplacement2...@googlegroups.com


Hi all

I have attached the interview questions in thoughtworks . Hope this
may be of some help



Regards

Sasi kumar T



-- 
Regards,
$iva




-- 
Regards,
$iva

-- 
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.



thoughtworks.pdf
Description: Adobe PDF document


[algogeeks] c output .. help plz

2011-09-06 Thread sivaviknesh s
 printf("%d",3.14*6.25*6.25);

...ans : 0 ..how and why?? why not type conversion take place??

-- 
Regards,
$iva

-- 
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] C output????

2011-09-06 Thread sivaviknesh s
main()
{
char *p="persons";
clrscr();
if(p=="persons")
printf("technical %s",p);
else
printf("true %s",p);
return 0;
}

..op : technical persons ..plz explain .. how come it works like an strcmp
operation???
-- 
Regards,
$iva

-- 
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] math puzzle

2011-08-28 Thread sivaviknesh s
*Find the number of solutions for 3x+4y=60, if x and y are positive
integers.*

Is there any standard method for solving these type of ques ..or only trial
and error ???

-- 
Regards,
$iva

-- 
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] constructor ques

2011-08-22 Thread sivaviknesh s
you have 4 classes A,B,C,D and class Z is derived from all these classes
using
Class Z: public A,private B,Protected C, Virtual D
What is the order of constructor call?

...plz reason out also

-- 
Regards,
$iva

-- 
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] Re: fork() question

2011-08-14 Thread sivaviknesh s
http://faq.programmerworld.net/networking/unix-interview-questions-answers.html

refer 16 th ques in this site .. they ve told 2^n times..so only i asked
whether its compiler dependent ??

On Sun, Aug 14, 2011 at 11:12 PM, sivaviknesh s wrote:

> int main()
> {
> fork();
> fork();
> fork();
> printf("Hello world!");
> }
>
> ...this will print hello world 8 times...i.e . 2^n times
>
> but...
>
> int main()
> {
> fork();
> fork();
> fork();
> fork()
> printf("Hello world!");
> }
>
> http://ideone.com/TRKTE
>
> ..but this prints only 11 times
> -- and for five forks 25 times...plz tell how..or is this a prob wit
> compiler???
> Regards,
> $iva
>
>


-- 
Regards,
$iva

-- 
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] fork() question

2011-08-14 Thread sivaviknesh s
int main()
{
fork();
fork();
fork();
printf("Hello world!");
}

...this will print hello world 8 times...i.e . 2^n times

but...

int main()
{
fork();
fork();
fork();
fork()
printf("Hello world!");
}

http://ideone.com/TRKTE

..but this prints only 11 times
-- and for five forks 25 times...plz tell how..or is this a prob wit
compiler???
Regards,
$iva

-- 
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] virtual functions output

2011-08-01 Thread sivaviknesh s
#include
#include

using namespace std;

class Base
{
public:
  Base()
  {
fun(); //note: fun() is virtual
  }
  virtual void fun()
  {
cout<<"\nBase Function";
  }
};

class Derived: public Base
{
public:
  Derived(){}
  virtual void fun()
  {
cout<<"\nDerived Function";
  }
};

int main()
{
  Base* pBase = new Derived();
  delete pBase;

  getchar();
  return 0;
}

Output:
*Base Function*

See following excerpt from C++
standardfor
explanation.

*When a virtual function is called directly or indirectly from a constructor
(including from the mem-initializer for a data member) or from a destructor,
and the object to which the call applies is the object under construction or
destruction, the function called is the one defined in the constructor or
destructor’s own class or in one of its bases, but not a function overriding
it in a class derived from the constructor or destructor’s class, or
overriding it in one of the other base classes of the most derived object.*

Because of this difference in behavior, it is recommended that object’s
virtual function is not invoked while it is being constructed or destroyed.
See this
for
more details.
..CAN ANYONE GIVE A SIMPLE EXPLANANTION?? given explanation is
quite confusing

-- 
Regards,
$iva

-- 
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] Morgan stanely interview ques

2011-07-31 Thread sivaviknesh s
*Given an nxn screen, Each pixel is represented by intensity values.  Given
a specific pixel as an input, find the no. of pixels of the same   colour
which can reached from this pixel. Assume any suitable data structure for a
screen.

..can this be implemented through BFS ...similar to BITMAP prob in spoj ??
*
-- 
Regards,
$iva

-- 
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] Frequently asked interview ques

2011-07-31 Thread sivaviknesh s
1. Given words in a newspaper as input find the words that have occured oly
once

2. Find the 5 most repeating words in a given document

...Is there any other optimal solutions other than using map ??

-- 
Regards,
$iva

-- 
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] Least Common Ancestor

2011-07-27 Thread sivaviknesh s
How to find Least Common Ancestor of a BINARY TREE without using PARENT
POINTERS ?

give algo / ideas plz ??

-- 
Regards,
$iva

-- 
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] Fwd: SORTING ARRAYS

2011-07-26 Thread sivaviknesh s
-- Forwarded message --
From: Padmaja Sridharan 
Date: Wed, Jul 27, 2011 at 5:15 AM
Subject: SORTING ARRAYS
To: mitcse08i...@googlegroups.com



Given two arrays
a[] = {1,3,2,4}
b[] = {4,2,3,1}
both will have the same numbers but in different combination.
We have to sort them . The condition is that you cannot compare only
elements within the same array.You can compare element of one array with
another only.



~With Regards
Padmaja



-- 
Regards,
$iva

-- 
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] Re: Directi question-centre of the tree

2011-07-26 Thread sivaviknesh s
we can do like creating an adjacency matrix..populate all values i.e.
cost to reach each node...finally find the nodes that has min value...any
other gud solutions??

On Wed, Jul 27, 2011 at 2:16 AM, sivaviknesh s wrote:

> the question is clear..you draw the sample test case and work out ..
> you will understand
>
> 1
>  /  /   \
> 4  2   3
> /\
>5 6
>
> here from node 2 the maximum cost to reach any node 'i' is 2 and
> minimum is 1
>
> ...so M(2) = max(1,2)=2..the same is the case for node 1 also
>
> ...if you consider node 4 , to reach 6 , cost is 3similar is
> applicable for other nodes
>
> therefore centre = min(M(1..6)) = 1 and 2.
> ...hope u got me!!
>
> On Wed, Jul 27, 2011 at 2:08 AM, siva viknesh wrote:
>
>>
>>
>>
>> -- Forwarded message --
>> From: jayapriya surendran 
>> Date: Sep 29 2010, 9:41 pm
>> Subject: Directi question-centre of the tree
>> To: Algorithm Geeks
>>
>>
>> In graph theory, atreeis defined as a graph on N nodes,and (N-1)
>> un-directed edges such that there are no cycles in the graph.Each node
>> has a single unique path to every other node.
>> Let D(u,v) be the number of edges in the unique path from node 'u' to
>> node 'v' (or from node 'v' to 'u' since the edges are
>> un-directed).D(u,u) is 0 for all nodes 'u'.
>> M(u)=MAX(D(u,i):for all nodes i)
>> Thecenterof atreeis the node (or nodes) 'u',for which M(u) is
>> minimum among all the nodes in the graph.
>> You'll be given a graph which has N nodes (1<=N<=20).The nodes are
>> labeled 1,2,3,..N.You will be provided with N-1 edges in the form of
>> "a b" pairs where 1<=a,b<=N.No edge will be repeated.You can assume
>> that the edges are specified such that the graph is a validtreeas
>> defined above.
>> Output the node labels of thecenter(or centers) of thetree.
>> Sample Input:
>> 6(value of N)
>> 1 3 (edges)
>> 1 4
>> 1 2
>> 2 5
>> 2 6
>>
>> Sample Output
>> 1
>> 2
>> Expected:O(N) complexity algo
>> can anyone plz help me out with O(N) algo?
>>
>
>
>
> --
> Regards,
> $iva
>
>


-- 
Regards,
$iva

-- 
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] Re: Directi question-centre of the tree

2011-07-26 Thread sivaviknesh s
the question is clear..you draw the sample test case and work out ..
you will understand

1
 /  /   \
4  2   3
/\
   5 6

here from node 2 the maximum cost to reach any node 'i' is 2 and
minimum is 1

...so M(2) = max(1,2)=2..the same is the case for node 1 also

...if you consider node 4 , to reach 6 , cost is 3similar is
applicable for other nodes

therefore centre = min(M(1..6)) = 1 and 2.
...hope u got me!!

On Wed, Jul 27, 2011 at 2:08 AM, siva viknesh wrote:

>
>
>
> -- Forwarded message --
> From: jayapriya surendran 
> Date: Sep 29 2010, 9:41 pm
> Subject: Directi question-centre of the tree
> To: Algorithm Geeks
>
>
> In graph theory, atreeis defined as a graph on N nodes,and (N-1)
> un-directed edges such that there are no cycles in the graph.Each node
> has a single unique path to every other node.
> Let D(u,v) be the number of edges in the unique path from node 'u' to
> node 'v' (or from node 'v' to 'u' since the edges are
> un-directed).D(u,u) is 0 for all nodes 'u'.
> M(u)=MAX(D(u,i):for all nodes i)
> Thecenterof atreeis the node (or nodes) 'u',for which M(u) is
> minimum among all the nodes in the graph.
> You'll be given a graph which has N nodes (1<=N<=20).The nodes are
> labeled 1,2,3,..N.You will be provided with N-1 edges in the form of
> "a b" pairs where 1<=a,b<=N.No edge will be repeated.You can assume
> that the edges are specified such that the graph is a validtreeas
> defined above.
> Output the node labels of thecenter(or centers) of thetree.
> Sample Input:
> 6(value of N)
> 1 3 (edges)
> 1 4
> 1 2
> 2 5
> 2 6
>
> Sample Output
> 1
> 2
> Expected:O(N) complexity algo
> can anyone plz help me out with O(N) algo?
>



-- 
Regards,
$iva

-- 
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] Hash map , hash table - DOUBTS!!!!

2011-07-23 Thread sivaviknesh s
what is the time complexity of a hash map??for insertion and searching

are hash table and hash map same ??

can anybody give a good explanation with example or even suggest good
links.thanks in advance :)



-- 
Regards,
$iva

-- 
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] ms ques

2011-07-18 Thread sivaviknesh s
convert a number in base 5  to  base 9 

-- 
Regards,
$iva

-- 
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] Fwd: MICROSOFT INTERNSHIP (Coding round)

2011-07-18 Thread sivaviknesh s
-- Forwarded message --
From: sivaviknesh s 
Date: Mon, Jul 18, 2011 at 11:29 PM
Subject: Fwd: MICROSOFT INTERNSHIP (Coding round)
To: algogeeks@googlegroups.com




-- Forwarded message --
From: subramania jeeva 
Date: Thu, Sep 23, 2010 at 7:53 AM
Subject: Re: MICROSOFT INTERNSHIP (Coding round)
To: mitcse08i...@googlegroups.com


Also in placement the question asked was

   Given a 2 dimensional matrix with its rows and columns are in
sorted order. You've to find a number and return its positions from that
matrix...  I think the efficient way is binary search... It'll take log(n^2)
to the base 4.

Mostly they're expecting C code rather than C++ So
improve your C knowledge..



say

1 2 3
4 5 6
7 8 9

...say u ve to find '8'

start from 1 ...check its right (2) nd down (4)

4>2 (but 4<8)so go to 4again check its right (5) nd down (7)

7>5finally reached 8 in four stepscomplexity is less than o(m*n)...

...am i rite???








Cheers
  ~ Jeeva ~



-- 
Regards,
$iva




-- 
Regards,
$iva

-- 
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] Fwd: MICROSOFT INTERNSHIP (Coding round)

2011-07-18 Thread sivaviknesh s
-- Forwarded message --
From: subramania jeeva 
Date: Thu, Sep 23, 2010 at 7:53 AM
Subject: Re: MICROSOFT INTERNSHIP (Coding round)
To: mitcse08i...@googlegroups.com


Also in placement the question asked was

   Given a 2 dimensional matrix with its rows and columns are in
sorted order. You've to find a number and return its positions from that
matrix...  I think the efficient way is binary search... It'll take log(n^2)
to the base 4.

Mostly they're expecting C code rather than C++ So
improve your C knowledge..








Cheers
 ~ Jeeva ~



-- 
Regards,
$iva

-- 
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] ms ques

2011-07-18 Thread sivaviknesh s
Implement a C++ garbage collector efficiently..any ideas ???

..shud we need to do something with destructor???
-- 
Regards,
$iva

-- 
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.