Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Need help with C Programming assignment
#21
Devil's Sunrise Wrote:There are some other ways I can think of right now, both seem to be possibly faster:
Set up two arrays with 256 slots.
Whenever "a" is found in any string, increase the "a"-value for that string's array. Do that for all values. When null is found, check that the two arrays you've made is equal.

Set up a list or a hash-array. Repeat the same thing as written above.

honestly, i dont know enough to know how to do that. And i kept trying to sort the strings and kept getting various problems. currently have something working, doubt it's perfect.
 Spoiler

edit: posted what i have that seems to work for permutation, now working on main.
have got it to read the dictionary into a string array, but cant get it to acknowledge that a word is in the dictionary, even like the first word. Keeps coming back false for the test.
Reply


Messages In This Thread
Need help with C Programming assignment - by Fiel - 2009-11-23, 09:18 PM
Need help with C Programming assignment - by Fiel - 2009-11-23, 09:22 PM
Need help with C Programming assignment - by Fiel - 2009-11-25, 08:13 AM
Need help with C Programming assignment - by Fiel - 2009-11-25, 11:51 AM
Need help with C Programming assignment - by Sivrat - 2009-11-26, 01:10 PM

Forum Jump:


Users browsing this thread: