Weekly Challenge #18
Hey there replers! 1 week ago, we started the 5th batch of repl.it weekly challenges!
So below are the results for the last weekly challenge aka Weekly Challenge #17.
WEEKLY 17 Results
Here are the results for the weekly challenge #17.
In case you did not make into the top 3, you can check out your score at the weekly results website - https://weekly.thedrone7.repl.co
But before that, here's this week's weekly challenge for you all!
Going back to being beginner friendly
So here's what you have to make this week. Firstly, you're supposed to take text input from the user such as
abc. (This input will only contain alphabets). Then you have to generate all words that can be formed using the given letters such as
cab and arrange them in alphabetical order.
The user will provide a second input, such as
ac and you have to return its position from the alphabetically ordered list of possible words.
For submitting your repls, post them on the repl talk share board and ensure that they contain
#WEEKLY in their name.
NOTE : You cannot have multiple weekly challenge submissions but if you want to share multiple ways of achieving the goal, you can make regular posts that don't contain
#WEEKLYin their name, even
And that's it for today, code away and have fun replers!
Will the inputs be case sensitive? If so, how should case be sorted? Should it be
@TheDrone7 , if I am using java, can I use something like
scanner.nextLine().toLower(); to convert BOTH of the inputted Strings to lower case then start generating words and finding?
So if a user enters
AbHaY bHaT, i make it into
abhay bhat then generate it from that. Is that allowed?
I'm not sure "words" is the right word for that:
Then you have to generate all words that can be formed using the given letters such as a, b, c, ab, ba, ac, ca, bc, cb, abc, acb, bac, bca, cba, cab and arrange them in alphabetical order.
I think, out of that whole list, only "cab" is an English word.
Also, by sort, does it mean to sort the letters themselves or to sort the "words"?
Might I ask, what is it that separates the good from the bad in these weeklies? If everyone's code does the same thing, what do you actually judge?
Can we remove spaces and special characters from our input? like if inputs
Ex3amp^le Se nT ence, can we just remove the special characters and spaces to get:
examplesentence? or is this not allowed..
If the first input contains several the same letter, do we remove the duplicates ?
And is it mandatory to generate the list or do we just need to return the position ?
Should the output be starting from 0 or 1? For example, if the input is abc, then ac, should the output be 3 or 4? (The correct alphabetical sequence is a,ab,abc,ac,acb,b,ba,bac,bc,bca,c,ca,cab,cb,cba)
So, if the user inputs
abc, the program should return
cab? Or should it just return english words possible to be created with those characters?
Am I allowed to ask why I got only 6?
Looking forward to this new one, I like permutations challenges!
@TheDrone7 Oh ok. I was just confused since I used the same method as CodingCactus (well, my "official" one, my non-official one used a totally different method than anyone but I figured it would get counted as recursion), but now that I know extra presentation stuff gives you points I understand more.
Why didn't you score mine https://repl.it/talk/share/WEEKLY-Fibonacci-Sequence/53381