Re: [algogeeks] ADOBE SOLUTIONS PARTNER Consulting Services -Increase your Digital Business with Infinate 360

2020-06-16 Thread sanjiv yadav
Hi Mark,
I will be available between 10 am to 4 pm tomorrow. So you can connect me
any time in between.

On Tue, 16 Jun 2020, 19:02 Pavan_DigitalTechnocryne, <
pavan.mtech1...@gmail.com> wrote:

> Hi ,
>
>
>
> I am Mark from Infinate360 Consulting Services. Recently we saw your
> linkedin profile and wanted to introduce our company which helps companies
> in Adobe Solution Patner i.e Adobe analytics Implementation Services. We
> have completed integrating with https://www.thecatalystacademy.org/ as
> our first project.
>
>
>
> About Adobe analytics:
>
> Adobe Analytics gives marketers the ability to understand their business,
> industry, and audience on a deeper level. With real-time understanding of
> behavioural patterns and other consumer insights, Adobe Analytics has the
> ability to vastly improve marketing performance.
>
> A successful Adobe Analytics implementation requires a knowledgeable team
> with the right expertise––a team that not only has deep technical
> expertise, but one that also understands the underlying business
> objectives. Axis41 provides this kind of team. As a long-time Adobe
> partner, our experience allows us to successfully execute as needed,
> whether you’re migrating to Adobe Analytics for the first time, need help
> re-implementing or advancing your current implementation, or assistance
> with ongoing maintenance, reporting, and analysis.
>
> Our Adobe Analytics services cover:
>
> Strategy and Planning
>
> · Clarifying business objectives and requirements via stakeholder
> interviews
>
> · Developing a measurement strategy that defines goals, audiences
> and intent, and KPIs
>
> · Developing a report strategy that yields meaningful, actionable
> insights
>
> Implementation and QA
>
> · Translating business requirements into Adobe Analytics design
> specifications
>
> · Implementing tags with or without a tag management solution
>
> · Validating code, tags, and reports across different environments
>
> Reporting and Analysis
>
> · Creating reports appropriate for the various audiences in your
> organization
>
> · Interpreting the reports and translating data into actionable
> recommendations
>
> Training
>
> · Using a tag management system to deploy new/update tags
>
> · Building reports and using the Adobe Analytics tool
>
> · Interpreting data and finding answers that drive business
> results
>
> Looking forward to hearing from you. Please let us know your feasible time
> to connect.
>
>
>
>
>
> Regards,
>
> Mark Anthony
>
> CEO – Infiante 360
>
> Website will be back by 12 June 2020
>
> Linkedin : https://www.linkedin.com/company/13734744/admin/
>
>
>
>
>
> --
> You received this message because you are subscribed to the Google Groups
> "Algorithm Geeks" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to algogeeks+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/algogeeks/CAOYnF_Tvhk79NqkJ82HYKH8sw_mbj_9s%2B9YB5av6brWBfP%2Bpfw%40mail.gmail.com
> 
> .
>

-- 
You received this message because you are subscribed to the Google Groups 
"Algorithm Geeks" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to algogeeks+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/algogeeks/CALiFd1D1bf-sJcMiDz%2BwVomfEXWQniBgQukFnGs3wgR-WKbn0Q%40mail.gmail.com.


Re: [algogeeks] binary search tree over btree

2012-04-04 Thread sanjiv yadav
In BST the height can be made as bad as u can but in case of btree the
height can not be more than log n base 2 because for each internal node it
is necessary to have at least 2 child and here all the leaf nodes must be
at the same label.

On Sun, Apr 1, 2012 at 8:34 PM, arun kumar  wrote:

> hi i just like to know when you will go for binary search tree over
> btree. advantage and disadvantage, application of both of them.
> thank you in advance
> Regards,
> Arun kumar
>
> --
> 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

Sanjiv Yadav

MobNo.-  8050142693

Email Id-  sanjiv2009...@gmail.com

-- 
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: m*n matrix, sorted rows, sorted columns, WAP to find an element efficiently

2012-04-03 Thread sanjiv yadav
we can also apply binary search on rows and columns separately by which we
will decide that in which 1/4th part we need to search.So in this case
complexity will be O(log m + log n).

just check and let me know...

On Wed, Apr 4, 2012 at 5:27 AM, Ashish Goel  wrote:

> why not start from middle(m/2, n/2)
> Best Regards
> Ashish Goel
> "Think positive and find fuel in failure"
> +919985813081
> +919966006652
>
>
>
> On Wed, Apr 4, 2012 at 12:29 AM, Karthikeyan V.B wrote:
>
>> Hi,
>>
>> Start from right top corner
>> If matrix element > key move to previous column
>> else if matrix element < key move to next row
>>
>> int search(int** a,int key,int m,int n)
>> {
>> if (key < a[0][0] || key > a[m-1][n-1]) return 0;
>> int min=a[0][n-1],i=0,j=n-1;
>> while(i<=m-1 && j>=0)
>> {
>> if(a[i][j] > key)
>> j--;
>> else if(a[i][j] < key)
>> i++;
>> else
>> return 1;
>> }
>> return 0;
>> }
>>
>> Regards,
>> Karthikeyan.V.B
>>
>>  --
>> 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.
>



-- 
Regards

Sanjiv Yadav

MobNo.-  8050142693

Email Id-  sanjiv2009...@gmail.com

-- 
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: determining if frequency is greater than n/2

2012-04-01 Thread sanjiv yadav
if all values x are known to be contiguous then I think it will take o(1)
time because it will be majority element if it occurs more than n/2 times
as x must be at the middle.

so if mid=(low+high)/2 and x==a[mid]then x is majority element otherwise
not.

just checklet me know.

On Thu, Feb 9, 2012 at 11:40 PM, Don  wrote:

> It can't be done in O(log n) unless the array is sorted or there is
> some other special property, for example, if all values x are known to
> be contiguous, allowing you to use a binary search to find the first
> and last location of x.
>
> In the general case it is impossible in O(log n) because you have to
> examine at least n/2 elements to reach a conclusion. In some cases you
> must examine all n elements.
>
> Don
>
> On Feb 8, 1:45 pm, Prakhar Jain  wrote:
> > Hello everyone,
> >
> > suppose we have an array of size n and a number, say x, and we have to
> > determine whether the number x is present in the array more then n/2
> times
> > or not?
> > can we have an O(log n) algo for determining it..?..pls help...!!!
> >
> > --
> > --
> > Prakhar Jain
> > IIIT Allahabad
> > B.Tech IT 3rd Year
> > Mob no: +91 9454992196
> > E-mail: rit2009...@iiita.ac.in
> >   jprakha...@gmail.com
>
> --
> 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

Sanjiv Yadav

MobNo.-  8050142693

Email Id-  sanjiv2009...@gmail.com

-- 
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] Array problem

2012-03-11 Thread sanjiv yadav
u r right.

On Mon, Mar 12, 2012 at 11:17 AM, atul anand wrote:

> @sanjiv : wont work for this test case :-
>
> {1,5,3,6,2,7,8};
>
>
> On Mon, Mar 12, 2012 at 10:54 AM, sanjiv yadav wrote:
>
>> @atul anand- It will still work as follows---
>>
>> (3,0)
>> /  \(5,0+3)
>>   (1,0) \(6,0+3+5)
>> \(2,0+1)\(7,0+3+5+6)
>>   \(8,0+3+5+6+7)
>>
>> here, my logic is that if number is grater than its parent,then add the
>> parent in the current sum,else keep it as such.
>>
>> check it and made correction in my logic if i m wrong.
>>
>>
>> On Mon, Mar 12, 2012 at 10:33 AM, atul anand wrote:
>>
>>> @piyush : i dont think so BIT would work over here , we are not just
>>> reporting cumulative sum tilll index i.
>>>
>>> On Mon, Mar 12, 2012 at 12:58 AM, Piyush Kapoor wrote:
>>>
>>>> This can be done very easily with the help of a Binary Indexed Tree,and
>>>> it is very short to code as well.Simply process the numbers in order,and
>>>> for each number output the cumulative frequency of the index of the number
>>>> you are processing.
>>>>
>>>>
>>>>  --
>>>> 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.
>>>
>>
>>
>>
>> --
>> Regards
>>
>> Sanjiv Yadav
>>
>> MobNo.-  8050142693
>>
>> Email Id-  sanjiv2009...@gmail.com
>>
>>  --
>> 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.
>



-- 
Regards

Sanjiv Yadav

MobNo.-  8050142693

Email Id-  sanjiv2009...@gmail.com

-- 
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] Array problem

2012-03-11 Thread sanjiv yadav
@atul anand- It will still work as follows---

(3,0)
/  \(5,0+3)
  (1,0) \(6,0+3+5)
\(2,0+1)\(7,0+3+5+6)
  \(8,0+3+5+6+7)

here, my logic is that if number is grater than its parent,then add the
parent in the current sum,else keep it as such.

check it and made correction in my logic if i m wrong.

On Mon, Mar 12, 2012 at 10:33 AM, atul anand wrote:

> @piyush : i dont think so BIT would work over here , we are not just
> reporting cumulative sum tilll index i.
>
> On Mon, Mar 12, 2012 at 12:58 AM, Piyush Kapoor wrote:
>
>> This can be done very easily with the help of a Binary Indexed Tree,and
>> it is very short to code as well.Simply process the numbers in order,and
>> for each number output the cumulative frequency of the index of the number
>> you are processing.
>>
>>
>>  --
>> 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.
>



-- 
Regards

Sanjiv Yadav

MobNo.-  8050142693

Email Id-  sanjiv2009...@gmail.com

-- 
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] Array problem

2012-03-11 Thread sanjiv yadav
u r right payal but
can u expln o(n) time complexity..

On Sun, Mar 11, 2012 at 6:10 PM, payal gupta  wrote:

> By Augmented BST-
> TC-O(n)
>
>
> On Sun, Mar 11, 2012 at 3:08 PM, Gaurav Popli wrote:
>
>> given an array of size n...
>> create an array of size n such that ai where ai is the element in the
>> new array at index location i is equal to sum of all elements in
>> original array which are smaller than element at posn i...
>>
>> e.g
>> ar[]={3,5,1,6,7,8};
>>
>> ar1[]={0,3,0,9,15,22};
>>
>> --
>> 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.
>



-- 
Regards

Sanjiv Yadav

MobNo.-  8050142693

Email Id-  sanjiv2009...@gmail.com

-- 
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: Doubt in removing loop from linked list

2012-03-09 Thread sanjiv yadav
actually how u r moving from 7 to 4?

can tell me in the detail...

On Sat, Mar 10, 2012 at 4:37 AM, Dave  wrote:

> @Rahul: The definitions of m and p are in the first sentence of the
> posting.
>
> Dave
>
> On Friday, March 9, 2012 12:46:43 PM UTC-6, rahul sharma wrote:
>
>> @dave..
>>
>> plz tell use of variable...m and p??
>> p i thnik no. of nodes in cycle..???
>>
>> plz tell what is p and m
>>
>> On Fri, Mar 9, 2012 at 10:16 PM, Dave  wrote:
>>
>>> @Rahul: You have to figure out where the fast and slow pointers meet,
>>> which will depend on the distance m from the head to the cycle and the
>>> period p of the cycle. It is awkward to explain in words, so draw a picture
>>> and label it according to this discussion.
>>>
>>> Suppose the two pointers meet k nodes from the beginning of the cycle.
>>> Then the slow pointer has moved m + t*p + k nodes, where t is the number of
>>> times the slow pointer traverses the cycle, and the fast pointer has moved
>>> m + u*p + k nodes, where u is the number of times the fast pointer has
>>> traversed the cycle. The number of double steps of the fast pointer is (m +
>>> u*p +k)/2, and this equals the number of single steps the slow pointer has
>>> taken. Thus, m + u*p + k = 2(m + t*p + k), so k = (2*t - u)*p - m, i.e.,
>>> some number of times around the cycle minus m. Now start the fast pointer
>>> at the head and take m single steps with both pointers. The fast pointer is
>>> at the beginning of the cycle, and the slow pointer has traversed the cycle
>>> (2*t  - u) times and is back at the beginning of the cycle. The pointers
>>> couldn't be equal sooner since the fast pointer is not in the cycle after
>>> less than m steps and the slow pointer is in the cycle.
>>>
>>> Dave
>>>
>>> On Friday, March 9, 2012 4:18:14 AM UTC-6, rahul sharma wrote:
>>>
>>>> i have 2 pointers fast and slow.now if tehy meet there is a loop...
>>>>
>>>> now keep one ptr at meeting point and take other one to the begining of
>>>> listmove both at speed of one..they will meet at start of loophow
>>>> this happens???why they meet at start..plz tell logic behind this???thnx in
>>>> advance
>>>>
>>>  --
>>> You received this message because you are subscribed to the Google
>>> Groups "Algorithm Geeks" group.
>>> To view this discussion on the web visit https://groups.google.com/d/**
>>> msg/algogeeks/-/Z0xNjVOTEgkJ<https://groups.google.com/d/msg/algogeeks/-/Z0xNjVOTEgkJ>
>>> .
>>>
>>> To post to this group, send email to algogeeks@googlegroups.com.
>>> To unsubscribe from this group, send email to algogeeks+unsubscribe@**
>>> googlegroups.com .
>>> For more options, visit this group at http://groups.google.com/**
>>> group/algogeeks?hl=en <http://groups.google.com/group/algogeeks?hl=en>.
>>>
>>
>>  --
> You received this message because you are subscribed to the Google Groups
> "Algorithm Geeks" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/algogeeks/-/U4Wzxa0ntosJ.
>
> 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

Sanjiv Yadav

MobNo.-  8050142693

Email Id-  sanjiv2009...@gmail.com

-- 
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] Doubt in removing loop from linked list

2012-03-09 Thread sanjiv yadav
I think u r making mistake i.e. after 7,5 will com not 4 because loop
starts from 5.check it again

On 3/9/12, rahul sharma  wrote:
> @sanjiv...how can u take q at c.they will meet at some position ...
> suppose u have
>
> 1-2-3-4-5-6-7-4
>
> now initialy
>
> slow and fast both at 1
> start incrementing slow by 1 and fast by 2
>
> slow @2  ...fast @3
> slow @3fast @5
> s...@4...fast@7
> slow @5...fast@5
>
> both are equalmeans dere is loop.
>
> take anyone of the slow/fast say fast @ start i.e @1
>
> now we have s...@5...fast@1...
> incrementing bith by 1
>
> s...@6...fast@2
> s...@7fast@3
> s...@4..fast@4...
> they are equal..means we are at start of loop.
>
> i got the algo...but didnt get the logichow they are meeting @start.
>
>
> On Fri, Mar 9, 2012 at 7:42 PM, sanjiv yadav wrote:
>
>> suppose linked list is
>>
>> a->b->c->d->e
>>
>> and suppose loop starts from 'c'
>>
>> according to u let one pointer be at 'c' say *q and another be at 'a' say
>> *p. Now if we move both at the speed of one then
>>
>> After first pass
>>
>> p will be at b
>>
>> q will be at d
>>
>> After second pass
>>
>> p will be at c
>>
>> q will be at e
>>
>> After third pass
>>
>> p will be at d
>>
>> q will be at c
>>
>> After fourth pass
>>
>> p will be at e
>>
>> q will be at d
>>
>> After fifth pass
>>
>> p will be at c
>>
>> q will be at e
>>
>>
>> and so on.
>>
>> Correct me if i am wrong.
>>
>>
>> On Fri, Mar 9, 2012 at 7:28 PM, rahul sharma
>> wrote:
>>
>>> @terencei cant get..can u eleboratethnx for the sol..but plz
>>> elaborate...
>>>
>>>
>>> On Fri, Mar 9, 2012 at 5:59 PM, Terence  wrote:
>>>
>>>>  @ rahul sharma:
>>>> the linked list is a combination of a list a->b->...->p->q and a cycle
>>>> q->r->...->z->q. (z != p).
>>>> noting that the start of cycle q is the only node with 2 predecessor: p
>>>> and z.
>>>> if 2 pointers meet at some node x, different from q, in last step they
>>>> must have met at x', the predecessor of x.
>>>> the above logic holds for all nodes in cycle except q.
>>>>
>>>> @ sanjiv yadav:
>>>> They will meet at the start of loop.
>>>> ex.  a->b->c->d->e->c->d->e...
>>>> First round:
>>>> A: a->b->c->d
>>>> B: a->c->e->d
>>>> meet at d.
>>>> Second round:
>>>> A: a->b->c
>>>> B: d->e->c
>>>> meet at c.
>>>>
>>>>
>>>> On 2012-3-9 18:39, sanjiv yadav wrote:
>>>>
>>>> No They will not meet at the start in a case containing 5 nods and
>>>> having loop at the third node. once check this
>>>>
>>>> On Fri, Mar 9, 2012 at 3:48 PM, rahul sharma
>>>> wrote:
>>>>
>>>>> i have 2 pointers fast and slow.now if tehy meet there is a loop...
>>>>>
>>>>>  now keep one ptr at meeting point and take other one to the begining
>>>>> of listmove both at speed of one..they will meet at start of
>>>>> loophow this happens???why they meet at start..plz tell logic
>>>>> behind
>>>>> this???thnx 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.
>>>>>
>>>>
>>>>
>>>>
>>>>  --
>>>> Regards
>>>>
>>>>  Sanjiv Yadav
>>>>
>>>>  MobNo.-  8050142693
>>>>
>>>>  Email Id-  sanjiv2009...@gmail.com
>>>>
>>>> --
>>>> 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.
>>

Re: [algogeeks] A strange doubt with cpp class. Why compile error ?

2012-03-09 Thread sanjiv yadav
write..

Abc a=Abc()

it will execute...

On Fri, Mar 9, 2012 at 8:15 PM, ~*~VICKY~*~  wrote:

> #include
> using namespace std;
> class Abc
> {
>
> public :
> int i;
> Abc(){ i = 0;}
>
> };
> int main()
> { Abc a = new Abc();
> cout< }
>
>
> --
> Cheers,
>
>   Vicky
>
>  --
> 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

Sanjiv Yadav

MobNo.-  8050142693

Email Id-  sanjiv2009...@gmail.com

-- 
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] Doubt in removing loop from linked list

2012-03-09 Thread sanjiv yadav
suppose linked list is

a->b->c->d->e

and suppose loop starts from 'c'

according to u let one pointer be at 'c' say *q and another be at 'a' say
*p. Now if we move both at the speed of one then

After first pass

p will be at b

q will be at d

After second pass

p will be at c

q will be at e

After third pass

p will be at d

q will be at c

After fourth pass

p will be at e

q will be at d

After fifth pass

p will be at c

q will be at e


and so on.

Correct me if i am wrong.

On Fri, Mar 9, 2012 at 7:28 PM, rahul sharma wrote:

> @terencei cant get..can u eleboratethnx for the sol..but plz
> elaborate...
>
>
> On Fri, Mar 9, 2012 at 5:59 PM, Terence  wrote:
>
>>  @ rahul sharma:
>> the linked list is a combination of a list a->b->...->p->q and a cycle
>> q->r->...->z->q. (z != p).
>> noting that the start of cycle q is the only node with 2 predecessor: p
>> and z.
>> if 2 pointers meet at some node x, different from q, in last step they
>> must have met at x', the predecessor of x.
>> the above logic holds for all nodes in cycle except q.
>>
>> @ sanjiv yadav:
>> They will meet at the start of loop.
>> ex.  a->b->c->d->e->c->d->e...
>> First round:
>> A: a->b->c->d
>> B: a->c->e->d
>> meet at d.
>> Second round:
>> A: a->b->c
>> B: d->e->c
>> meet at c.
>>
>>
>> On 2012-3-9 18:39, sanjiv yadav wrote:
>>
>> No They will not meet at the start in a case containing 5 nods and having
>> loop at the third node. once check this
>>
>> On Fri, Mar 9, 2012 at 3:48 PM, rahul sharma wrote:
>>
>>> i have 2 pointers fast and slow.now if tehy meet there is a loop...
>>>
>>>  now keep one ptr at meeting point and take other one to the begining
>>> of listmove both at speed of one..they will meet at start of
>>> loophow this happens???why they meet at start..plz tell logic behind
>>> this???thnx 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.
>>>
>>
>>
>>
>>  --
>> Regards
>>
>>  Sanjiv Yadav
>>
>>  MobNo.-  8050142693
>>
>>  Email Id-  sanjiv2009...@gmail.com
>>
>> --
>> 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.
>



-- 
Regards

Sanjiv Yadav

MobNo.-  8050142693

Email Id-  sanjiv2009...@gmail.com

-- 
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] Doubt in removing loop from linked list

2012-03-09 Thread sanjiv yadav
No They will not meet at the start in a case containing 5 nods and having
loop at the third node. once check this

On Fri, Mar 9, 2012 at 3:48 PM, rahul sharma wrote:

> i have 2 pointers fast and slow.now if tehy meet there is a loop...
>
> now keep one ptr at meeting point and take other one to the begining of
> listmove both at speed of one..they will meet at start of loophow
> this happens???why they meet at start..plz tell logic behind this???thnx 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.
>



-- 
Regards

Sanjiv Yadav

MobNo.-  8050142693

Email Id-  sanjiv2009...@gmail.com

-- 
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: Exchanging bit values in a number

2011-11-14 Thread sanjiv yadav
suppose we have to swap bits  b1 and b2  in a number n.Then

if(b1==b2)  do nothing

else take a hexadecimal number whose all bits are zero except bits b1 and
b2.bit b1=1 and bit b2=1

now  xor of original no with this no will give the desired result.

On Sun, Oct 30, 2011 at 10:32 AM, shiva@Algo  wrote:

> we need to swap only if both the bits are not same
>
> if((n^(1< n^=(1<
> On 10/29/11, praveen raj  wrote:
> > int func(int x)
> > {
> > int  y=(1< >  int z=x&y;// if after bitwise and  ..we get power of 2 then
> ...
> > we have to flip the bits..
> > if((z&(z-1))==0)
> >return(x^y);
> > else
> >   return x;
> > }
> >
> > With regards,
> >
> > Praveen Raj
> > DCE-IT
> > 735993
> > praveen0...@gmail.com
> >
> >>
> >>
> >
> > --
> > 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: Exchanging bit values in a number

2011-11-14 Thread sanjiv yadav
suppose we have to swap bits  b1 and b2  in a number n.Then

if(b1==b2)  do nothing

else take a hexadecimal number whose all bits are zero except bits b1 and
b2.bit b1=1 and bit b2=1

now  xor of original no with this no will give the desired result.suppose
we have to swap bits  b1 and b2  in a number n.Then

if(b1==b2) do not do any thing

else take a hexadecimal number whose all bits are zero except bits b1 and
b2.bit b1=1 and bit b2=1

now  xor of original no with this no will give the desired result.

On Sun, Oct 30, 2011 at 10:32 AM, shiva@Algo  wrote:

> we need to swap only if both the bits are not same
>
> if((n^(1< n^=(1<
> On 10/29/11, praveen raj  wrote:
> > int func(int x)
> > {
> > int  y=(1< >  int z=x&y;// if after bitwise and  ..we get power of 2 then
> ...
> > we have to flip the bits..
> > if((z&(z-1))==0)
> >return(x^y);
> > else
> >   return x;
> > }
> >
> > With regards,
> >
> > Praveen Raj
> > DCE-IT
> > 735993
> > praveen0...@gmail.com
> >
> >>
> >>
> >
> > --
> > 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: Exchanging bit values in a number

2011-11-14 Thread sanjiv yadav
suppose we have to swap bits  b1 and b2  in a number n.Then

if(b1==b2) do not do any thing

else take a hexadecimal number whose all bits are zero except bits b1 and
b2.bit b1=1 and bit b2=1

now  xor of original no with this no will give the desired result.

On Sun, Oct 30, 2011 at 10:32 AM, shiva@Algo  wrote:

> we need to swap only if both the bits are not same
>
> if((n^(1< n^=(1<
> On 10/29/11, praveen raj  wrote:
> > int func(int x)
> > {
> > int  y=(1< >  int z=x&y;// if after bitwise and  ..we get power of 2 then
> ...
> > we have to flip the bits..
> > if((z&(z-1))==0)
> >return(x^y);
> > else
> >   return x;
> > }
> >
> > With regards,
> >
> > Praveen Raj
> > DCE-IT
> > 735993
> > praveen0...@gmail.com
> >
> >>
> >>
> >
> > --
> > 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: Missing elements

2011-08-01 Thread sanjiv yadav
it is really good algorithm

On 8/2/11, Deepak giggs  wrote:
> @varun : clear :) thanks...
>
> On Mon, Aug 1, 2011 at 11:44 PM, kartik sachan
> wrote:
>
>> similar type algo is there in geeksforgeeks.org in array section from
>> there u can understand it better way
>>
>>  --
>> 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.
>>
>
>
>
> --
> Thanks & Regards,
> Deepak.L
> http://www.kurukshetra.org.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.
>
>

-- 
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 test Q-1

2011-08-01 Thread sanjiv yadav
node sort(node root)
{
node first;
int count=0;count1=0;count2=0;
for(first=root;first !=null;first=first->next)
{
if(first->data==1) count++;
if(first->data==2) count1++;
if(first->data==3) count2++;
}
first=root;
for(first;first !=null;first=first->next)
{
if(count>0)
{
first->data=1;
count--;
}
else if(count1>0)
{
first->data=2;
count1--;
}
else if(count2 >0)
{
first->data=3;
count2--;
}
return root;
}

On 8/2/11, lokesh  wrote:
> any other solution other than counting no. of 1s, 2s and 3s?
>
> --
> 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.