On 19/04/15 16:25, niyanax...@gmail.com wrote:
May you take a look and let me know what needs to be changed? Thank you in
advance.
The node code looks OK.
class Map:
Read through your init method, remembering that it only gets calledv
once when the Map is created.
def __init__(
Thank You Steven for your great help You really helped me to understand my
assignment more as well as what maps and linked lists are.
I used your guidance and came up with my full code.
May you take a look and let me know what needs to be changed? Thank you in
advance.
class Node:
Hello Ni'Yana, and welcome!
On Fri, Apr 17, 2015 at 06:11:00PM +, niyanax...@gmail.com wrote:
> Hello I need guidance trying to solve my assignment. I am completely
> lost when using maps with linked lists. I understand linked lists
> though. May someone work with me?
We will not do your h
>
>
> I hate when teachers ask students to do stupid stuff like this.
> It encourages so many bad practices it's positively dangerous!
> If they must have them reinvent the wheel at least let them
> use the native Python list to do it!
>
>
I suspect that the instructor is using Python as a second
On 17/04/15 19:11, niyanax...@gmail.com wrote:
Hello I need guidance trying to solve my assignment.
> I am completely lost when using maps with linked lists.
> I understand linked lists though.
Unfortunately we do not. Linked lists aren't really
a native Python type and maps are a native type
Sent from Windows Mail
From: Ni'Yana Morgan
Sent: Friday, April 17, 2015 2:06 PM
To: tut...@python.org
Hello I need guidance trying to solve my assignment. I am completely lost when
using maps with linked lists. I understand linked lists though. May someone
work with
Hi,
well i am able to find a loop in a list using two iterators.One
iterator runs "two times faster than the other", and if he encounters
the first, it means that there is a loop.
Example :
1,2,3,4,5,6,7,8,9,5
the algorithm would generate:
start - 1,2
iteration 1- 2, 4
iteration 2- 3, 6
iteratio
Terry Reedy wrote:
David Hláčik wrote:
But what if i have another condition , and that is *i can use only
helping memory with constant size* ? This means i am not able to
create any set and adding elements there. I need to have a constant
size variables . This is complication a complication for
Hi,
so okay, i will create a helping set, where i will be adding elements
ID, when element ID will be allready in my helping set i will stop and
count number of elements in helping set. This is how long my cycled
linked list is.
But what if i have another condition , and that is *i can use only
h
On Wed, Jan 7, 2009 at 5:59 AM, David Hláčik wrote:
> Hello guys,
>
> I have a linked list where *number of elements is unlimited* and
> **last element points on random (can be first, last, in middle ,
> anywhere) element within linked list** - this is important . My goals
> is to create an archit
David Hláčik wrote:
Hello guys,
I have a linked list where *number of elements is unlimited* and
**last element points on random (can be first, last, in middle ,
anywhere) element within linked list** - this is important . My goals
is to create an architecture /scheme for **algoritmus which will
Hello guys,
I have a linked list where *number of elements is unlimited* and
**last element points on random (can be first, last, in middle ,
anywhere) element within linked list** - this is important . My goals
is to create an architecture /scheme for **algoritmus which will count
total number of
> > >>> myls=range(50)
> > >>> for i in myls:
> > print i
> > if i==20:
> > myls.insert(5,5)
> >
> > The point is, the list(both size and elements) is
> > changing even as it is being operated upon.
>
> My first thought was to say, "Use a queue.Queue." But it appe
Jeff Shannon wrote:
You might want to check the Cookbook to see if there's a priority
queue recipe there. If not, I suspect that Google can be convinced to
yield something...
From the bisect module docs:
import Queue, bisect
class PriorityQueue(Queue.Queue):
def _put(self, item):
bisec
On Sat, 5 Mar 2005 06:20:40 -0800 (PST), Shitiz Bansal
<[EMAIL PROTECTED]> wrote:
> In order to explain wat my problem is, here is an
> example code. Its not exactly what I am doing, I am
> using multiple threads and a rather complicated code
> so try and understand the sense rather than the code
Stéphane Brunet wrote:
Kent Johnson wrote:
What Jacob is saying is, one common way to deal with this is to make a
copy of the list and iterate over that while changing the original
list. Your sample would look like this:
Hi,
And what if the list is *really* big ? Don't you loose much speed/memor
> >>> myls=range(50)
> >>> for i in myls:
> print i
> if i==20:
> myls.insert(5,5)
>
> The point is, the list(both size and elements) is
> changing even as it is being operated upon.
You are quite right it is, in general a bad idea to alter
the thing you are iterating over.
> This particular ca
Kent Johnson wrote:
What Jacob is saying is, one common way to deal with this is to make a
copy of the list and iterate over that while changing the original
list. Your sample would look like this:
Hi,
And what if the list is *really* big ? Don't you loose much speed/memory
while making a copy ?
Got ya, it doesnt however help in my case as inside
the for loop also i intend to change the list
elements.
--- Kent Johnson <[EMAIL PROTECTED]> wrote:
> Shitiz Bansal wrote:
> > I could not understand what you exactly mean.
> >
> > In order to explain wat my problem is, here is an
> > example c
Shitiz Bansal wrote:
I could not understand what you exactly mean.
In order to explain wat my problem is, here is an
example code. Its not exactly what I am doing, I am
using multiple threads and a rather complicated code
so try and understand the sense rather than the code
itself.
myls=range(50)
I could not understand what you exactly mean.
In order to explain wat my problem is, here is an
example code. Its not exactly what I am doing, I am
using multiple threads and a rather complicated code
so try and understand the sense rather than the code
itself.
>>> myls=range(50)
>>> for i in my
I'm taking a shot in the dark and answering here.
Have you tried making a copy of the list, iterating over the copy, and
changing the original based on the copy?
Jacob
Hi,
Any body has any idea on how to implement a linked
list in python?
Ordinary python lists are not quite the same. what i
need
Hi,
Any body has any idea on how to implement a linked
list in python?
Ordinary python lists are not quite the same. what i
need is a list i can traverse through sequentially
without bothering about the indices, as another
process is continuously editing this list, by
inserting and deleting elemen
23 matches
Mail list logo