HamidMolareza / Quera

پاسخ سوالات کوئرا به زبان‌های مختلف مثل سی‌شارپ، پایتون، جاوااسکریپت و غیره
GNU General Public License v3.0
25 stars 4 forks source link

A guide to solving Quera problems with JavaScript #51

Open HamidMolareza opened 3 days ago

HamidMolareza commented 3 days ago
HamidMolareza commented 3 days ago

Also, we can update the README file for the JavaScript template to suggest docker tool.

ARiYaNSEp0-0 commented 3 days ago

I had another method for handling inputs with V8 in non-complex cases like non-complex inputs. Initially, to solve Quera problems, I used JavaScript V8 (because at that time I wasn't familiar with Python). I created an index.html and an app.js file, and I was handling the inputs with prompt. It was working, and for submitting, I was just replacing prompt with readline. I think adding this method to a document for V8 is not a bad idea.

HamidMolareza commented 3 days ago

Every time I think about the approach Quera has taken for JavaScript, it seems like the best method is not solving problems with JavaScript at all! 😄

Anyway...
For those familiar with test writing, another good method might be to write a function to solve the problem and then use readline to handle input.
Of course, either many people aren’t familiar with it, or they don’t have the patience for it. Instead, they probably prefer a graphical solution like creating an HTML page.

The issue with these approaches is that errors might occur in input handling! In that case, you may need to upload the code multiple times and wait for Quera’s judging system to respond.

HamidMolareza commented 3 days ago

When updating the documents, I will include this method under your name.
Thank you.

ARiYaNSEp0-0 commented 3 days ago

Every time I think about the approach Quera has taken for JavaScript, it seems like the best method is not solving problems with JavaScript at all! 😄

Anyway... For those familiar with test writing, another good method might be to write a function to solve the problem and then use readline to handle input. Of course, either many people aren’t familiar with it, or they don’t have the patience for it. Instead, they probably prefer a graphical solution like creating an HTML page.

The issue with these approaches is that errors might occur in input handling! In that case, you may need to upload the code multiple times and wait for Quera’s judging system to respond.

😁😁 Same here, I don't solve algorithm challenges with JavaScript at all (just front-end challenges).