Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
Since it's an assignment, I won't give a solution, but, I can point you in the right direction, By the definition of sorting, any element on right must be bigger than one on left, just verify this from left to right for consecutive pairs, if false for any one pair, it's not sorted.
-
the reason why they won't help is that of SO not made to do your homework. theabbie already gave you pointers, but this is far too simple to even consider without you even mentioning what you have tried beforehand.
A simple solution would be to sort the array(using standard lib functionality or a basic sorting algo) and compare the elements of what was passed to what was expected, there is your true false. There are more elaborate solutions, but if you can't determine a simple algo like this one and then ask....then yeah, SO will throw you under the bus. Test, try it, write code and if it doesn't work then ask a question. This is a scientific field man, you need to show what you have done already. -
@AleCx04 thank you! Now can you teach me to hack? My alter ego d-fanelli yelled at me now Im sad
-
@TeachMeCode no, teach yourself man. Don't ask others to help you with this. The best teacher you are going to get is your own experience.
Try freecodecamp -
There was a @d-fanelli where did it go? Is this some joke?
Nevermind, got it, you changed username, but, is it still a joke? -
nibor48134yAlso this assignment shouldn't return a bool, it should return an int. The value returned indicates how sorted the array is at the time.
-
I stretched the rules a bit by posting on April 2 but this rant was just an April fools joke lol. I wanted to masquerade as the typical lazy/dumb programmer we bump into often that can’t use the right tag, can’t write the simplest code and can’t use a search engine. I provided hints in the tags that it’s an April fools joke in case people take it seriously (bc it was posted after April 1). Sadly I can’t change my username for another six months and I’m kinda pissed at that lol....This is d-fanelli, btw
-
Tonnoman6224y@theabbie to be fair that pretty much answers the question as much as you can without knowing the specific language this has to be done in
-
@Tonnoman0909 I can find you people who claim to know programming but can't implement it even with that information, I am pretty sure those people won't know how to break out of loop and check whether it was a break or normal termination, by setting flags.
-
Tonnoman6224y@theabbie but that sounds like an issue with language knowledge rather than problem solving which is something that can mostly be fixed with doc reading, not asking in forums
-
@Tonnoman0909 Maybe it was a language assignment and not algorithms assignment, so, giving away algorithm won't be that bad as he still needs to implement which requires knowledge of that language, anyways, this was April Fools Joke.
-
Sorry guys, this was an April fools joke mocking people who post homework thats super trivial without even getting the tags right. Yes we were all new at some point but most of us hopefully resorted to google without wasting other people’s time. Then again this question should be simple enough without even needing google
HELP! Stack overflow did not take this question! I want to learn code! How can I learn code if they won’t help! Question was:
CS 101 take home assignment question 1: write a function to determine if an array of numbers is sorted. The function must return true if it is, false otherwise.
@Fast-Nop , @Root , @theabbie please. I have a week to get this question done ðŸ˜
devrant
d-fanellirant developerrant april1rant