CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3
  1. #1
    Join Date
    Oct 2008
    Posts
    2

    Question help me in coding this

    1) An array A is of size N. Write a java method that jumbles all values in the array.
    All possible permutations must be possible and chances for each possible
    permutation must be equal. For example, size of array A is 3.A[0]=x,A[1]=y,A[2]=z.
    Possible permutations are 3!.After jumbling elements, there would be equal chances
    for each of xyz, yxz , ....to be in the array elements.


    2) 50,000 html files are in a folder on a windows machine.Among them,content of some files
    (not the file names)contain the sentence "Welcome to java!".Write a java program
    to count the no of such files.
    Last edited by vikram_43; October 10th, 2008 at 02:45 AM.

  2. #2
    dlorde is offline Elite Member Power Poster
    Join Date
    Aug 1999
    Location
    UK
    Posts
    10,163

    Re: help me in coding this

    We're not going to write it for you, so what is it you are stuck on?

    Post your code and ask specific questions about it and we can probably help you get it right.

    The biggest difference between time and space is that you can't reuse time...
    M. Furst
    Please use [CODE]...your code here...[/CODE] tags when posting code. If you get an error, please post the full error message and stack trace, if present.

  3. #3
    Join Date
    Jul 2005
    Location
    Currently in Mexico City
    Posts
    568

    Re: help me in coding this

    vikram_43, to post your homework so the others do it for you is bad, mkay?
    Wanna install linux on a vacuum cleaner. Could anyone tell me which distro sucks better?

    I had a nightmare last night. I was dreaming that I’m 64-bit and my blanket is 32-bit and I couldn’t cover myself with it, so I’ve spent the whole night freezing. And in the morning I find that my blanket just had fallen off the bed. =S (from: bash.org.ru)

    //always looking for job opportunities in AU/NZ/US/CA/Europe :P
    willCodeForFood(Arrays.asList("Java","PHP","C++","bash","Assembler","XML","XHTML","CSS","JS","PL/SQL"));

    USE [code] TAGS! Read this FAQ if you are new here. If this post was helpful, please rate it!

Posting Permissions

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





Click Here to Expand Forum to Full Width

Featured