I have to write a Java program that generates all anagrams for a word by tomorrow night...

I have to write a Java program that generates all anagrams for a word by tomorrow night. I started it days ahead of time but I fucked up and didn't read the directions thoroughly so I didn't realize I was required to use recursion, so now I have to start over. How fucked am I? I have less than 24 hours to finish

Attached: 1200px-Java_programming_language_logo.svg.png (1200x2195, 116K)

Other urls found in this thread:

letmegooglethat.com/?q=generate permutations recursion
repl.it/repls/VioletredNonstopWebpage
twitter.com/SFWRedditGifs

Just start working on it instead of bitching about it here. You'll finish, it doesn't sound like an especially difficult project.

If you have to send file, send a corrupted file.
I used to do this to gain time.

Just convert the string into a charArray and generate all the permutations.
letmegooglethat.com/?q=generate permutations recursion

The first time I wrote the algorithm, it was hard as shit and took me several days. But that might be because I didn't know what I was was doing and I was pretty much just writing shitty spaghetti code in the main method. Today I went and talked to a TA and he explained how to use recursion and what parameters to use so hopefully it'll be easier this time around.
Doubt that would cut it with this professor. He doesn't seem like the type that would be sympathetic if you fuck up.

The prof told us to use StringBuilder so that's what I'm going to use to store my strings

You can use StringBuilder since it’s mutable, I told you to convert it into a char Array because Strings are immutable.

repl.it/repls/VioletredNonstopWebpage

Here you go, user.

This will print duplicates if you type a word with 2 or more same characters (try NEET and see what happens), but aside from that, it fulfills all the requirements you need.

Attached: spoonfeeding.jpg (590x350, 34K)

Thanks, fellow computer scientist. It's not exactly what I needed but reading it helped me understand a little better what I need to do

Go to Jow Forums you retard

He wanted help, not pointless shitposting.

Also, if you call me Computer Scientist one more time, I'll fucking eat your limbs.

>It's not exactly what I needed
Also, you never posted what EXACTLY you needed. What the hell did you expect, that I can read your fucking mind? I'm not your Hashishi Elephant Demigod you fucking Pajeet.

>it helped me understand a little better what I need to do
alsoou don't understand shit.
Give up and find a real job for fucks sake. Computer programming is not for you.

idk what anagrams are but if they have to mean something and one word can get into few this shit requires dictionary database. your algorithm is just n! outputs?

>idk what anagrams are
google it

>but if they have to mean something
no they don't

>and one word can get into few this shit requires dictionary database
OP clearly states that he needs a solution using recursion. If you had a database, you would just have to count the letters and print all the words with the same letter count. If you had a brain you'd realize that recursion doesn't fit that case at all. So most likely OP just means "permutations" (I'll help you with the googling - anagram is just word permutation).

>your algorithm is just n! outputs?
yes?
and your post is just three incoherent bullshit statments?
where the last one contains a question mark at the end when it's not even a question?

How about you write some code when you're so smart?

Oh right, you can't. You can only talk shit.

Pussy nigger bitch.

> An anagram is a word or phrase formed by rearranging the letters of a different word or phrase, typically using all the original letters exactly once

that's what I found and what I asked. All anagrams are permutations but not all permutations are anagrams.

Whatever results are provided in anagram makers they're not n!

You are retarded. OP's professor is CLEARLY not asking him to make "le anagram maker app xDDD (TM)" - he was just giving him an exercise to teach him about recursion, and permutations are a common example.

JFC I leave the thread and it devolves into shit flinging. I never asked anyone to do my fucking project for me, I just wanted someone to validate me and say it was possible. Yes, it's an actual anagram maker, not just permutations. Yes, I have a dictionary that I have to put into a trie to search. No, I don't need help anymore. I've figured most of it out, I just need to debug a little. No need to bicker like a bunch of retards about my stupid fucking project.

Man it's the same thing as a permutation builder, you just check each permutation against the dictionary.