Updates from the Repl.it team about the product

← Back to all posts
Weekly Challenge #18
h
TheDrone7 (1774)

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.

RANK 1 : @AdCharity @DynamicSquid and @HarperframeInc

RANK 2 : @ThatSmart @CodingCactus and @sourcerose

RANK 3 : @minx28 @Lord_Poseidon @generationXcode @dabs364 and @Codemonkey51

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!


Word Order!

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 a, b, c, ab, ba, ac, ca, bc, cb, abc, acb, bac, bca, cba, 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.

SUBMISSION

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 #WEEKLY in their name, even WEEKLY is fine.

And that's it for today, code away and have fun replers!

Comments
hotnewtop
poetaetoes (293)

Oh uh cool. I never saw this after aa few months being on repl. lol

Nayoar (561)

Will the inputs be case sensitive? If so, how should case be sorted? Should it be abAB or aAbB etc?

TheDrone7 (1774)

@minx28 nah no case sensitivity

Nayoar (561)

@TheDrone7 so does it have to be case INsensitive? or will you just only input lowercase? sorry for all the questions...

TheDrone7 (1774)

@minx28 Insensitive, I might use my phone for judging and gboard automatically capitalizes some stuff.

EpicGamer007 (1609)

@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?

TheDrone7 (1774)

@EpicGamer007 absolutely! As I said, the case doesn't matter at all. If there goes an uppercase character in input, it's unintentional and should be treated as just an alphabet irrespective of its case

wh0 (7)

what were the scoring criteria on this one?

TheDrone7 (1774)

@wh0 the scoring criteria is always the same, 4 points for completing the challenge and 6 for bonus work such as UI and efficiency and stuff.

wh0 (7)

oh, never knew about the UI thing lol

TheDrone7 (1774)

@wh0 I mean, you can just overdo the other things and leave the UI trash and still get full 10 XD.

wh0 (7)

leave the UI trash

ouch

xxpertHacker (861)

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"?

TheDrone7 (1774)

@xxpertHacker I said "words" not "English words" and it means sorting the "words" in alphabetical order.

TheDrone7 (1774)

@xxpertHacker this comments section is for any doubts like that.

HarperframeInc (446)

@HarperframeInc ahah yes the dynamic leaderboard works- now how to add custom fonts...

HarperframeInc (446)

@TheDrone7 Weekly Website is broken/down

HarperframeInc (446)

@TheDrone7 It's back up now, but I kept on getting CANNOT GET /

xxpertHacker (861)

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?

TheDrone7 (1774)

@xxpertHacker There are multiple ways of doing everything, the judging is about stuff like how creative you were with handling the given task. How interesting is the final thing to use, etc.

EpicGamer007 (1609)

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..

TheDrone7 (1774)

@EpicGamer007 nope, although I technically wouldn't be entering them while testing anyways but it should be easier to just let them be.

DynamicSquid (4634)

So like this:

Enter string: abc
Enter substring: ac

Index: 5
abc3354 (225)

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 ?

TheDrone7 (1774)

@abc3354 no the duplicates shall remain and in case the second input contains duplicates, you only need to provide the position of the first one.

AIDENSANDBAKKEN (2)

@TheDrone7 so if the first input is aab the list should be a, a, aa, aa, aab, aab, ab, ab, aba, aba, b, ba, ba, baa, baa, correct?

abc3354 (225)

So square root is not a "stdlib function that might use looping or recursion behind the scenes" ?

TheDrone7 (1774)

@abc3354 I made an exception for mathematical operations otherwise even multiplication needs that.

FlaminHotValdez (440)

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)

TheDrone7 (1774)

@maxyang either is fine, I'll be using the first alphabet for every program to test where it starts from and then test the other ones.

generationXcode (329)

epic I know just what to do now

adl212 (166)

So, if the user inputs abc, the program should return a, b, c, ab, ba, ac, ca, bc, cb, abc, acb, bac, bca, cba, cab? Or should it just return english words possible to be created with those characters?

TheDrone7 (1774)

@adl212 it's supposed to return none of those. It's supposed to return the position of the second word inputted by the user in the alphabetically sorted list of those words.

adl212 (166)

@TheDrone7 So, the position from all of the possible "words" you can make? So, it doesn't have to be english words right?

TheDrone7 (1774)

@adl212 yep it doesn't have to be English words.

adl212 (166)

@TheDrone7 Is there a way I could have gotten more points for last week's challenge?

TheDrone7 (1774)

@adl212 the 6 additional points after the 4 for completing the challenge are very subjective. You can add more presentation such as colors in the console and proper spacing and usage of newlines and stuff like that. You can also add multiple types of calculating and stuff like that.

HahaYes (1913)

can I import intertools?

HahaYes (1913)

crap I missed last one... oh well! I'll have to try really hard I guess

JosephSanthosh (1196)

Ummm, why is my result not in the results:

HahaYes (1913)

@JosephSanthosh ye you copied from geekstogeeks and you got DQed by Drone

JosephSanthosh (1196)

The dq was for a fun version of the challenge, and I wasn't copying, I was following a tutorial. @HahaYes

TheDrone7 (1774)

@JosephSanthosh I always specify in the challenge post that if you're posting an alternative solution, do not include #WEEKLY in your post's title. In your case, you ignored this and your fun version got considered as your final submission and thus DQed.

JosephSanthosh (1196)

Oh, I wasn't aware of this as I wouldn't have done this. In this case it was a mistake and I didn't ignore as you stated. Thank you for telling me, I would have renamed it if you had told me in the post. @TheDrone7

JosephSanthosh (1196)

Since this was a unintentional mistake could you please un-DQed my challenge post. @TheDrone7

JosephSanthosh (1196)

Why? I mean you knew that was a parody, it was stated there. I didn't know we couldn't do that! @TheDrone7

TheDrone7 (1774)

@JosephSanthosh as said earlier, it contained #WEEKLY in the title and will be considered your final submission. I cannot make exceptions.

fuzzyastrocat (1513)

Am I allowed to ask why I got only 6?

Looking forward to this new one, I like permutations challenges!

TheDrone7 (1774)

@fuzzyastrocat there were 4 points for satisfying the requirements and 6 for creativity/extra features. You just used the Binet's formula which wasn't much creative. And there were no additional features.

fuzzyastrocat (1513)

@TheDrone7 Wait, how did I use binet's formula? Isn't that the phi thing? I used metaprogramming with string multiplication. (But I understand on the additional features thing, I'm new to this so I will add that in next time! :D)

TheDrone7 (1774)

@fuzzyastrocat I mostly gave low scores to programs that I didn't find much interesting. Binet's formula was one of the most common methods so I assumed yours was also one of them.

fuzzyastrocat (1513)

@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.

AmazingMech2418 (1044)

@fuzzyastrocat So, you used my method? LOL! I wonder why I only got 7 though...

fuzzyastrocat (1513)

@AmazingMech2418 I dunno, I think it's because we both just solved the problem but I guess you're supposed to solve the problem and make an interface for it. I could be wrong though.

AmazingMech2418 (1044)

@fuzzyastrocat By interface, you mean like prompt or readline, right?

fuzzyastrocat (1513)

@AmazingMech2418 No, I mean like a website or something else to 'present' it in.

fuzzyastrocat (1513)

@AmazingMech2418 Hm yeah I guess so, I was thinking of codingCactus but DynamicSquid didn't do that... so yeah I'm really not sure why I only got 6 and why you only got 7

Coder100 (17007)

can i also print the sorted subsets please

oops i meant words

k9chelsea2 (785)

lol imagine not doing a weekly because you hate maths ha could never be me, cant relate not in a million years

dabs364 (276)

ah yes...
we have wonderful loops again!

HahaYes (1913)

yayayayayayaya this deals with factorials?

Coder100 (17007)

well, if you want to calculate the number of permutations, sure, but it will NOT be needed haha @HahaYes

HahaYes (1913)

@Coder100 yeah I meant permutations not factorials

Coder100 (17007)

@HahaYes ew who uses permutations

firefish (1004)

@HahaYes HahaNo I agree with the grilled cookie

HarperframeInc (446)

yayayayayayyayay
First weekly challenge and I'm already in first place :P