Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / General / July 2006

Tip: Looking for answers? Try searching our database.

Looking for programmers...

Thread view: 
badasspirate@gmail.com - 05 Jul 2006 19:55 GMT
Hey all,
I am looking for some programmers with sufficient qualifications who
would like to join a freelancing programming group, either as a quick
way to make money, or something to do on the side. Anyway, I am really
optimistic about the possibilities that could arise from forming a
programming group (friends, MONEY, etc) and would like to get it
started. If you are interested, just solve this (intermediate skill)
programming problem and send me an email at badasspirate@gmail.com with
the subject "Wallys Traversal's".
------------------------------------------------------------------------------------
Problem Statement: Given a rooted, binary tree T, write a program that
prompts the user to enter the preorder traversal of T and the inorder
traversal of T.  The program should then output the postorder traversal
of T.

You may assume that each node is represented by a character.  So a
traversal (whether preorder, postorder, or inorder), is expressed as a
string.

Suppose Wally walks the tree:

                    a
                   / \
                  /   \
                 b     c
                / \     \
               /   \     \
              d     e     f
                          /
                         /
                        g

Here is an example of how the program should work:

Enter preorder traversal of T: abdecfg [Press Enter]
Enter inorder traversal of T: dbeacgf  [Press Enter]
Given the preorder traversal abdecfg and the inorder traversal dbeacgf,
I
conclude that the postorder traversal order of T is: debgfca

Your program does not have to provide any error-checking.
------------------------------------------------------------------------------------
The only reason I am including this is to keep away newbies from
joining the group. Just send me the compiled (or source code) .class
(or .java) files in an email if you are interested.
Sincerely,
Eric
Stefan Ram - 05 Jul 2006 19:59 GMT
>programming group (friends, MONEY, etc) and would like to get it

 Nice try. Still I will not do your homework.
Oliver Wong - 05 Jul 2006 20:57 GMT
>>programming group (friends, MONEY, etc) and would like to get it
>
>  Nice try. Still I will not do your homework.

   The OP seems to accept compiled .class files. Perhaps if you run your
code through an obfuscator first, you can prevent the OP from plagiarising
your work, while still submitting an solution.

   The problem statement is identical to the competition at
http://cs.hood.edu/pobw/POWDec052003.html (where you could have won a $20
gift certificates to Papa John's pizza), but the contest requires source
code, and the deadline was 2003.

   - Oliver
badasspirate@gmail.com - 06 Jul 2006 01:05 GMT
> >>programming group (friends, MONEY, etc) and would like to get it
> >
[quoted text clipped - 10 lines]
>
>     - Oliver

I did copy that problem exactly, as I had already solved it a year ago
in a programming competition at Hood University. I thought it was a
good candidate to use as a deterrent for noobs.
-Eric
Chris Smith - 06 Jul 2006 03:51 GMT
> I did copy that problem exactly, as I had already solved it a year ago
> in a programming competition at Hood University. I thought it was a
> good candidate to use as a deterrent for noobs.

If you're serious about this, you could ask people to join TopCoder...
I'm pretty impressed with their problems, and while my own score isn't
so great, I do think their scores are pretty meaningful in terms of
general programming skill.

A few more tips, in case you're interested:

- The all-caps MONEY makes me want very little to do with you.  I'm not
 interested in participating in programming projects with other people
 who are there looking for a quick buck.  If you're actually interested
 in fun and developing friendships, you would make that clearer by
 working on open source projects or something like that.  If you're in
 it for the cash, then you need to be willing to do the work or pay
 people reasonable industry rates to do parts of it for you.

- Identifying yourself only by first name and the email address
 badasspirate@gmail.com wouldn't make me trust you even if I were
 interested in entering a financial agreement with someone to produce
 code in exchange for vague promises of future riches.

Signature

Chris Smith - Lead Software Developer / Technical Trainer
MindIQ Corporation

Chris Uppal - 06 Jul 2006 10:43 GMT
>     The problem statement is identical to the competition at
> http://cs.hood.edu/pobw/POWDec052003.html (where you could have won a $20
> gift certificates to Papa John's pizza), but the contest requires source
> code, and the deadline was 2003.

Quite a nice little puzzle, though, as are the others in that sequence.

FWIW (which would seem to be several three-year-old pizzas) here's my attempt:

choyvp pynff JnyylJnyxre
{
   choyvp fgngvp ibvq
   znva(Fgevat[] netf)
   {
       cevagCbfgBeqre(netf[0], netf[1]);
       Flfgrz.bhg.cevagya();
   }

   choyvp fgngvp ibvq
   cevagCbfgBeqre(Fgevat cerBeqre, Fgevat vaBeqre)
   {
       vs (cerBeqre.yratgu() == 0)
           erghea;

       pune ebbg = cerBeqre.puneNg(0);
       vag yrsgFvmr = vaBeqre.vaqrkBs(ebbg);

      Fgevat yrsgCerBeqre = cerBeqre.fhofgevat(1, yrsgFvmr+1);
      Fgevat evtugCerBeqre = cerBeqre.fhofgevat(yrsgFvmr+1);
      Fgevat yrsgVaBeqre = vaBeqre.fhofgevat(0, yrsgFvmr);
      Fgevat evtugVaBeqre = vaBeqre.fhofgevat(yrsgFvmr+1, vaBeqre.yratgu());

      cevagCbfgBeqre(yrsgCerBeqre, yrsgVaBeqre);
      cevagCbfgBeqre(evtugCerBeqre, evtugVaBeqre);

      Flfgrz.bhg.cevag(ebbg);
   }
}

   -- chris
Mark Space - 06 Jul 2006 03:43 GMT
> ------------------------------------------------------------------------------------
> Problem Statement: Given a rooted, binary tree T, write a program that

So Mr. Pirate, your problem seem very simple to me.  How do I know that
you are not the noob?

Please post your solution.  To make things interesting, you may not use
a language with automatic garbage collection (ie., I want to see your
memory management), and you may not use libraries other than the IO
library. I'd prefer C.

Also, you may not use recursion.

Ready? Go.
M.J. Dance - 06 Jul 2006 14:58 GMT
> Hey all,
> I am looking for some programmers with sufficient qualifications who
[quoted text clipped - 43 lines]
> Sincerely,
> Eric

Code is below. Beware, though, that it's straight out of "How to write
unmaintainable code" manual. Meaning: if you show it to your examiner, he/she
will flunk you in a blink of an eye. Now, keep your friends and give me my
MONEY! ;-)

public class Traversal {
    private static void t(String tlr, String ltr) {
        if(tlr == null || tlr.length() == 0)
            return;
        String[][] s = new String[2][];
        for(int i = 0; i < s.length; i++)
            s[i] = new String[3];
        s[0][0] = tlr.substring(0, 1);
        int p = ltr.indexOf(s[0][0]);
        if(p > 0) {
            s[0][1] = tlr.substring(1, 1 + p);
            s[1][1] = ltr.substring(0, p);
        }
        if(p < ltr.length() - 1) {
            s[0][2] = tlr.substring(1 + p);
            s[1][2] = ltr.substring(1 + p);
        }
        if(s[0][1] != null)
            t(s[0][1], s[1][1]);
        if(s[0][2] != null)
            t(s[0][2], s[1][2]);
        System.out.print(s[0][0]);
    }
    public static void main(String[] args) {
        String tlr = "abdecfg";
        String ltr = "dbeacgf";
        //Your program does not have to provide any error-checking.
        t(tlr, ltr);
    }
}
M.J. Dance - 06 Jul 2006 15:25 GMT
BTW, guys, I don't understand your complaining about doing homework for some
lazy student. If you want to be really nasty, you should always oblige. Remember
the fable about a hungry Chinaman?
Oliver Wong - 06 Jul 2006 15:44 GMT
> Code is below. Beware, though, that it's straight out of "How to write
> unmaintainable code" manual. Meaning: if you show it to your examiner,
> he/she will flunk you in a blink of an eye.

   You'd be surprised at what teachers will tolerate.

   - Oliver
Mark Space - 07 Jul 2006 02:58 GMT
> Code is below. Beware, though, that it's straight out of "How to write
> unmaintainable code" manual. Meaning: if you show it to your examiner,

"Out of?"  I think you're the author... wow, that burned my eyes. :D


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.