MESSAGE
DATE | 2015-01-22 |
FROM | Maneesh Kongara
|
SUBJECT | Re: [LIU Comp Sci] Algorithms Assignment 1 attempt
|
From owner-learn-outgoing-at-mrbrklyn.com Thu Jan 22 19:34:40 2015 Return-Path: X-Original-To: archive-at-mrbrklyn.com Delivered-To: archive-at-mrbrklyn.com Received: by mrbrklyn.com (Postfix) id 9E75516115E; Thu, 22 Jan 2015 19:34:40 -0500 (EST) Delivered-To: learn-outgoing-at-mrbrklyn.com Received: by mrbrklyn.com (Postfix, from userid 28) id 7E922161165; Thu, 22 Jan 2015 19:34:40 -0500 (EST) Delivered-To: learn-at-mrbrklyn.com Received: from mail-qa0-f51.google.com (mail-qa0-f51.google.com [209.85.216.51]) by mrbrklyn.com (Postfix) with ESMTP id D4DB116115E for ; Thu, 22 Jan 2015 19:34:39 -0500 (EST) Received: by mail-qa0-f51.google.com with SMTP id f12so3785503qad.10 for ; Thu, 22 Jan 2015 16:34:39 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=5m/57EQtUOfs+DDHHXrMWqzVypSFVZJcv9BmM9yfJsM=; b=Xzqh37VIZtmwzeb/WP6K1OyEm6P91Ftggh7niT7UjEN2zZ8nsvpUwO0BqlUGrI4fvr nN6yd2wHCK68OSY9R+hQksYeI8axzp02zMjQUwJWz0JSoW7fsuN43uDYnD5hAQ8FJb6e u56lBa7Mk2gVDV/th+AUro84Ch/ZR+Tzo1k21lK5zCysCL+5T+B2dPOnxDNhPt/M89OS /wIHl0EW+8tSLTn4IV1+ieQre3rCd8jzYmP3MUCrgKmq41aIH6egBQ/MwLuqfcucbIuk dGcOr/FMcwez1FJm14B//EbY0o50gRalJ1uDIeZe4ZFQas2S4hImP4XbJ3z09/trnVG3 ZWIQ== MIME-Version: 1.0 X-Received: by 10.224.23.6 with SMTP id p6mr8689625qab.55.1421973279233; Thu, 22 Jan 2015 16:34:39 -0800 (PST) Received: by 10.229.157.204 with HTTP; Thu, 22 Jan 2015 16:34:38 -0800 (PST) Received: by 10.229.157.204 with HTTP; Thu, 22 Jan 2015 16:34:38 -0800 (PST) In-Reply-To: <54C19620.5070706-at-panix.com> References: <54C19620.5070706-at-panix.com> Date: Thu, 22 Jan 2015 19:34:38 -0500 Message-ID: Subject: Re: [LIU Comp Sci] Algorithms Assignment 1 attempt From: Maneesh Kongara To: learn-at-mrbrklyn.com Content-Type: multipart/alternative; boundary=001a11c2b31c305f9f050d46f4dd Sender: owner-learn-at-mrbrklyn.com Precedence: bulk Reply-To: learn-at-mrbrklyn.com
--001a11c2b31c305f9f050d46f4dd Content-Type: text/plain; charset=UTF-8
Sure thing. I'll post mine on the group soon. Thanks, Maneesh. On Jan 22, 2015 7:30 PM, "Ruben Safir" wrote:
> I've loaded my version of assignment 1 onto the NYLXS webserver at > > > http://www.nylxs.com/docs/grad_school/algorithms/hw/ass_1_lists/list.cpp.html > > http://www.nylxs.com/docs/grad_school/algorithms/hw/ass_1_lists > > Look it over and please edit and comment > > A few thoughts: > > > First, I changed to order of the function listings because we are not > using function declarations so the order that they are defined is > essential because they call each other. Ideally, one would make a .h file. > > Secondly, the given skeleton was essentially broken and I had to rewrite > all the functions. As it was, it not only didn't track the last entries > correctly near L.n == L.last, but also used an incorrect algorithm to > find is a list was full > > Thirdly, I reduced the size of the array from 100 to 5 so I could debug > it and show who it works. > > Fourthly, it takes some interpretation of the intent of the assignment > specifications to correctly right the code. This is all to common of a > problem. Give me the Spec! (I guess UML might be good for something). > As such, when the array is full and I'm adding from the last, then I > chose to push results forward and bump the first value. Likewise, for > InsertBegin, I push everything forward. He wrote this, actually, but I > filled in the case of what to do when the array is filled. I then give > a warning and bump the last value out of the array. > > Fifth: See my makefile and do yourself a favor and copy it and use it. > BTW - GVIM is your friend. > > Sixth: I let debugging code in my code. You can best run it like this > > list 2> /dev/nulll > > Even with that, it is quite chatty. > > Ruben >
--001a11c2b31c305f9f050d46f4dd Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Sure thing. I'll post mine on the group soon.
Thanks,
Maneesh.
On Jan 22, 2015 7:30 PM, "Ruben Safir"= < mrbrklyn-at-panix.com> wrote= : :0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">I've loaded my= version of assignment 1 onto the NYLXS webserver at
list.cpp.html" target=3D"_blank">http://www.nylxs.com/docs/grad_school/algo= rithms/hw/ass_1_lists/list.cpp.html
target=3D"_blank">http://www.nylxs.com/docs/grad_school/algorithms/hw/ass_= 1_lists
Look it over and please edit and comment
A few thoughts:
First, I changed to order of the function listings because we are not
using function declarations so the order that they are defined is
essential because they call each other.=C2=A0 Ideally, one would make a .h = file.
Secondly, the given skeleton was essentially broken and I had to rewrite > all the functions.=C2=A0 As it was, it not only didn't track the last e= ntries
correctly near L.n =3D=3D L.last, but also used an incorrect algorithm tor> find is a list was full
Thirdly, I reduced the size of the array from 100 to 5 so I could debug
it and show who it works.
Fourthly, it takes some interpretation of the intent of the assignment
specifications to correctly right the code.=C2=A0 This is all to common of = a
problem.=C2=A0 Give me the Spec! (I guess UML might be good for something).=
As such, when the array is full and I'm adding from the last, then I > chose to push results forward and bump the first value.=C2=A0 Likewise, for=
InsertBegin, I push everything forward.=C2=A0 He wrote this, actually, but = I
filled in the case of what to do when the array is filled.=C2=A0 I then giv= e
a warning and bump the last value out of the array.
Fifth:=C2=A0 See my makefile and do yourself a favor and copy it and use it= .
BTW - GVIM is your friend.
Sixth:=C2=A0 I let debugging code in my code.=C2=A0 You can best run it lik= e this
list 2> /dev/nulll
Even with that, it is quite chatty.
Ruben
--001a11c2b31c305f9f050d46f4dd--
|
|