Re: [Tutor] how to find the maximum length substring with equal 'a' and 'b' ?

2014-04-06 Thread Alan Gauld
On 06/04/14 19:27, Arup Rakshit wrote: Suppose, if I have the string 'aababbb', I want to get the output as 'aababb'. I want the output in time complexity O(N) and space complexity O(1). when input string is 'abababa', output should be same as input. You will need to explain more about what you

Re: [Tutor] how to find the maximum length substring with equal 'a' and 'b' ?

2014-04-06 Thread Steven D'Aprano
On Mon, Apr 07, 2014 at 02:27:55AM +0800, Arup Rakshit wrote: > Suppose, if I have the string 'aababbb', I want to get the output as > 'aababb'. I want the output in time complexity O(N) and space > complexity O(1). when input string is 'abababa', output should be same > as input. What is your

[Tutor] how to find the maximum length substring with equal 'a' and 'b' ?

2014-04-06 Thread Arup Rakshit
Suppose, if I have the string 'aababbb', I want to get the output as 'aababb'. I want the output in time complexity O(N) and space complexity O(1). when input string is 'abababa', output should be same as input. ___ Tutor maillist - Tutor@python.org T

Re: [Tutor] Python & algorithms (Lang line simplification algorithm)

2014-04-06 Thread Danny Yoo
Hi Laura, Algorithmic code typically is simple enough that standard language features should suffice. I think you might pick up an external library to make it easier to visualize graphical output, but the core algorithms there appear fairly straightforward. To get some familiarity with basic Py

Re: [Tutor] Python & algorithms (Lang line simplification algorithm)

2014-04-06 Thread Alan Gauld
On 06/04/14 09:46, Laura Kauria wrote: Can someone help with which kinds of libraries I need to download to start to work with lists consisting coordinates? It depends what you are doing but you may not need to download anything. Like Java Python has a large standard library of modules. Also

[Tutor] Python & algorithms (Lang line simplification algorithm)

2014-04-06 Thread Laura Kauria
Hi all, I'm new with python and have done little coding with Java. At uni I would need to start a coding task with python writing a proper/working code and we don't get much help at school. Can someone help with which kinds of libraries I need to download to start to work with lists consisting co

Re: [Tutor] Question about equality of sets

2014-04-06 Thread spir
On 04/05/2014 07:46 PM, Jim Byrnes wrote: Ubuntu 12.04 python 3.3 I was working through an exercise about sets. I needed to find the duplicates in a list and put them in a set. I figured the solution had to do with sets not supporting duplicates. I finally figured it out but along the way I wa

Re: [Tutor] One on one tutor

2014-04-06 Thread spir
On 04/05/2014 01:49 AM, Keith Adu wrote: Hi my name is Keith, am a beginner with no experience in python or computer science. Am looking for someone to work with me one on one, I have many question that I need answered, my question are basic as of the moment because am starting, I don't wan