Need solution for some problems urgently!!!!
CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 14 of 14

Thread: Need solution for some problems urgently!!!!

  1. #1
    Join Date
    Mar 2013
    Posts
    7

    Need solution for some problems urgently!!!!

    Name:  p1-1.png
Views: 88
Size:  55.5 KBName:  p1-2.png
Views: 76
Size:  48.3 KBName:  p1-3.png
Views: 73
Size:  16.3 KBName:  p2-1.png
Views: 69
Size:  72.2 KBName:  p2-2.png
Views: 65
Size:  14.0 KB

  2. #2
    Join Date
    Jan 2006
    Location
    Singapore
    Posts
    6,345

    Re: Need solution for some problems urgently!!!!

    It looks like you need to start working on some problems urgently so that you can come up with the solutions yourself.
    C + C++ Compiler: MinGW port of GCC
    Build + Version Control System: SCons + Bazaar

    Look up a C/C++ Reference and learn How To Ask Questions The Smart Way
    Kindly rate my posts if you found them useful

  3. #3
    Join Date
    Mar 2013
    Posts
    7

    Re: Need solution for some problems urgently!!!!

    ya but need efficient ones help will be really appreciable

  4. #4
    Join Date
    Jan 2006
    Location
    Singapore
    Posts
    6,345

    Re: Need solution for some problems urgently!!!!

    I see. So, what are your current solutions and what makes you think that they are inefficient?
    C + C++ Compiler: MinGW port of GCC
    Build + Version Control System: SCons + Bazaar

    Look up a C/C++ Reference and learn How To Ask Questions The Smart Way
    Kindly rate my posts if you found them useful

  5. #5
    Join Date
    Mar 2013
    Posts
    7

    Re: Need solution for some problems urgently!!!!

    lol yet to solve and actually even if I find 1 the time complexity will not be great for sure

  6. #6
    Join Date
    Jan 2006
    Location
    Singapore
    Posts
    6,345

    Re: Need solution for some problems urgently!!!!

    Well, look: you need to put in some effort. Think of something, implement it. If it is not good enough, you can ask for help in improving it. At the moment, all you're asking for is a code hand out.
    C + C++ Compiler: MinGW port of GCC
    Build + Version Control System: SCons + Bazaar

    Look up a C/C++ Reference and learn How To Ask Questions The Smart Way
    Kindly rate my posts if you found them useful

  7. #7
    Join Date
    Mar 2013
    Posts
    7

    Re: Need solution for some problems urgently!!!!

    hmm, that's unfair I guess

  8. #8
    GCDEF is offline Elite Member Power Poster
    Join Date
    Nov 2003
    Location
    Florida
    Posts
    12,196

    Re: Need solution for some problems urgently!!!!

    Quote Originally Posted by dotnet13 View Post
    hmm, that's unfair I guess
    Kind of delusional on your part too.

  9. #9
    Join Date
    Mar 2013
    Posts
    5

    Re: Need solution for some problems urgently!!!!

    You guess wrong. If we hand out the code to you, we would have made several errors:
    1-we would be blocking you from learning what you need to learn and so help to compromise your future
    2-you would just left and wouldn't see that as our help should inspire you to help others also, so we would be helping you became more selfish.
    3-we would be helping you to fool your teachers and so helping you to corrupt yoursef, so you may think you could do this every time
    4-we would be loosing valuable time helping who deserves it and giving this time for someone who doesn't
    among other things. So.... let's start to transform this mental fat in brain muscles... start to work.

  10. #10
    Join Date
    Dec 2012
    Location
    England
    Posts
    2,699

    Re: Need solution for some problems urgently!!!!

    Marking a post as 'urgent' does not get any faster/better answers from members. It just highlights to us that the post is relating to homework assignments!

    If you have problems trying to get some code to work then if you post the code we'll try to provide advice and guidance - but you need to have first produced the code and made at least an attempt to get it to compile or to debug it if it compiles!

    Please read

    http://forums.codeguru.com/showthrea...ork-assignment

    Before you start to code, you really need to first design the program - looking at the input, the data structures needed, the processing (logic and algorithms to use) and the output. Especially in problems like these, determining the logic/algorithms to use before starting to code is really important. Only once you are satisifed that the program design, algorithms etc are correct do you then start coding the design in a suitable language.

    How far have you got with the design? With coding?
    All advice is offered in good faith only. You are ultimately responsible for effects of your programs and the integrity of the machines they run on.

  11. #11
    Join Date
    Mar 2013
    Posts
    7

    Re: Need solution for some problems urgently!!!!

    Actually everyone here misinterpreted what I have said, what I meant was that asking directly for code is not fair at all. Hope you guys will understand now

  12. #12
    Join Date
    Dec 2012
    Location
    England
    Posts
    2,699

    Re: Need solution for some problems urgently!!!!

    Quote Originally Posted by dotnet13 View Post
    Actually everyone here misinterpreted what I have said, what I meant was that asking directly for code is not fair at all. Hope you guys will understand now
    OK. So what help are you actually looking for? If we knew more specifically, we could provide advice and guidance.
    All advice is offered in good faith only. You are ultimately responsible for effects of your programs and the integrity of the machines they run on.

  13. #13
    Join Date
    Apr 2000
    Location
    Belgium (Europe)
    Posts
    4,049

    Re: Need solution for some problems urgently!!!!

    Problem 1 is Mr Yoo's problem (it clearly says so). Why are you doing his work ? :-)

    problem 2 apparently only requires you to name the methodology, not actually write any code. it even has a time limit of 10seconds. I would expect your course books clearly have several methods outlined for such type problems and you need to identify the one used here.

  14. #14
    Join Date
    May 2009
    Posts
    2,413

    Re: Need solution for some problems urgently!!!!

    Quote Originally Posted by dotnet13 View Post
    lol yet to solve and actually even if I find 1 the time complexity will not be great for sure
    The first would be an Interval Scheduling problem and the second a Vertex Coloring problem. But as the problems are formulated there doesn't seem to be any optimization involved so it should be quite straightforward.

    In the first case you sort the meetings in start-time order and then assign them one by one to any free room. If all K rooms are occupied at some point in this process then bad luck. Someone is going to get angry but it's not in the task to avoid this. The meeting is cancelled and the assignment process continues with the next meeting in order. Meetings in progress can be kept in a set in end-time order. The meeting ending the soonest will always be first in that set, quick and easy to locate.

    In the second case you generate all valid colorings systematically. The simplest approach is to recursively visit all vertexes probing possible colors in turn considering already assigned colors. This graph traversing process will generate a combinatorial tree with each leaf representing a valid coloring. Thanks to the Four Color Theorem it's assured at least one valid coloring exists.
    Last edited by nuzzle; March 30th, 2013 at 02:22 AM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Windows Mobile Development Center


Click Here to Expand Forum to Full Width

This is a CodeGuru survey question.


Featured


HTML5 Development Center