Binary search experimental way

JDoodle - Online Compiler, Editor for Java, C/C++, etc
JDoodle is an Online Compiler, Editor, IDE for Java, C, C++, PHP, Perl, Python, Ruby and many more. You can run your programs on the fly online, and you can save and share them with others. Quick and Easy way to compile and run programs online.
28 Replies
JavaBot
JavaBot6mo ago
This post has been reserved for your question.
Hey @Rag...JN 🌌 🦡 👽 💰! Please use /close or the Close Post button above when your problem is solved. Please remember to follow the help guidelines. This post will be automatically closed after 300 minutes of inactivity.
TIP: Narrow down your issue to simple and precise questions to maximize the chance that others will reply in here.
Rag...JN 🌌 🦡 👽 💰 🐊
I konw there is a proper way of doing the binary search, but is it possible to do it in my way? I am experiencing erros on various conditions, some targets work, some target don't
if(route >=9) {
return 19999;
}
route++;
if(route >=9) {
return 19999;
}
route++;
is to avoid the continous looping
Unknown User
Unknown User6mo ago
Message Not Public
Sign In & Join Server To View
Rag...JN 🌌 🦡 👽 💰 🐊
which part? this part?
No description
Unknown User
Unknown User6mo ago
Message Not Public
Sign In & Join Server To View
Rag...JN 🌌 🦡 👽 💰 🐊
alright I am going to give up I'll do the proper way what part you meant by "side effects"? 🙏
Unknown User
Unknown User6mo ago
Message Not Public
Sign In & Join Server To View
Rag...JN 🌌 🦡 👽 💰 🐊
I thought this is what it means
No description
Rag...JN 🌌 🦡 👽 💰 🐊
alright alright
Unknown User
Unknown User6mo ago
Message Not Public
Sign In & Join Server To View
Rag...JN 🌌 🦡 👽 💰 🐊
alright ok got it
Unknown User
Unknown User6mo ago
Message Not Public
Sign In & Join Server To View
Rag...JN 🌌 🦡 👽 💰 🐊
that's how I've been doing all the code puzzles System.out.printlns, very bad I know no I remove them usually or comment them out
Unknown User
Unknown User6mo ago
Message Not Public
Sign In & Join Server To View
Rag...JN 🌌 🦡 👽 💰 🐊
yep ok thanks I will use this
JavaBot
JavaBot6mo ago
If you are finished with your post, please close it. If you are not, please ignore this message. Note that you will not be able to send further messages here after this post have been closed but you will be able to create new posts.
Rag...JN 🌌 🦡 👽 💰 🐊
my coding puzzle skills are rusty haven't touched them in a while.
Unknown User
Unknown User6mo ago
Message Not Public
Sign In & Join Server To View
Rag...JN 🌌 🦡 👽 💰 🐊
I did some in 2022
No description
Rag...JN 🌌 🦡 👽 💰 🐊
you know I have to get a job, so they give you leet code type puzzles as far as I know, but you know it better how this applies to a controller? same? So for example, When I have to show a display controller, I have to do a lot of read operations from the db, in order to show the necessary data (example select tags options) but yah it returns a response only in the end
Unknown User
Unknown User6mo ago
Message Not Public
Sign In & Join Server To View
Rag...JN 🌌 🦡 👽 💰 🐊
those needs to be handled by the repository
Unknown User
Unknown User6mo ago
Message Not Public
Sign In & Join Server To View
Rag...JN 🌌 🦡 👽 💰 🐊
why? then how are going to to display the necessary select tag options? wow ok ok
Unknown User
Unknown User6mo ago
Message Not Public
Sign In & Join Server To View
john
john6mo ago
there is more than the MVC pattern, there is alos the MVVP (or whatever it is and several others) .....but almost all of them use the concept of model MVC is a Seperation of Concerns design methodology and the point is that model is the programs data (the db accessor method, the user name to user instance mapping, the item lists, price lists, discount logic, etc) the view is what is shown to the user (the scene graph, the buttons, the text fields, the colour schemes, the error modals, the menu, etc) and the controller is the communication bridge between the two (takes the values from the user name and password field and calls the login method in the model and either shows an error or changes to the next screen after login is successful, etc)
Unknown User
Unknown User6mo ago
Message Not Public
Sign In & Join Server To View
JavaBot
JavaBot6mo ago
💤 Post marked as dormant
This post has been inactive for over 300 minutes, thus, it has been archived. If your question was not answered yet, feel free to re-open this post or create a new one. In case your post is not getting any attention, you can try to use /help ping. Warning: abusing this will result in moderative actions taken against you.
Want results from more Discord servers?
Add your server