Пікірлер
@SOUMYABANERJEE-hq9wl
@SOUMYABANERJEE-hq9wl Ай бұрын
Can we do this question using priority queue and custom sorting technique?
@kevintamakuwala
@kevintamakuwala Ай бұрын
@@SOUMYABANERJEE-hq9wl It would again take O(N) (for generation of numbers) + O(NlogN) (for sorting / priority queue) ending up in TLE. As constraints are in power of 9, Lesser than logarithmic Complexities are preferred
@hrutubhatt4179
@hrutubhatt4179 Ай бұрын
Great explanation! 🙌🏻
@kevintamakuwala
@kevintamakuwala Ай бұрын
@@hrutubhatt4179 thank you so much 😊
@it077brijpatel2
@it077brijpatel2 Ай бұрын
Excellent 😊
@kevintamakuwala
@kevintamakuwala Ай бұрын
@@it077brijpatel2 thank you so much 😊
@patelhitarth08
@patelhitarth08 Ай бұрын
Genuinely, a very good explanation it was 💯
@kevintamakuwala
@kevintamakuwala Ай бұрын
@@patelhitarth08 thank you so much 😊
@-Deependragharia
@-Deependragharia 2 ай бұрын
Great work ✨️✨️
@kevintamakuwala
@kevintamakuwala Ай бұрын
@@-Deependragharia thank you so much 😊
@mandarparekh8959
@mandarparekh8959 2 ай бұрын
great explained keep it up buddy....
@kevintamakuwala
@kevintamakuwala 2 ай бұрын
Thanks bro 🙏
@uditmehta5719
@uditmehta5719 2 ай бұрын
Nice explanation
@kevintamakuwala
@kevintamakuwala Ай бұрын
@@uditmehta5719 thank you so much 😊
@uditmehta5719
@uditmehta5719 2 ай бұрын
Nice explanation
@kevintamakuwala
@kevintamakuwala Ай бұрын
@@uditmehta5719 thank you so much 😊
@striver_108
@striver_108 2 ай бұрын
great
@kevintamakuwala
@kevintamakuwala Ай бұрын
@@striver_108 thank you so much 😊
@sahilsapariya5924
@sahilsapariya5924 2 ай бұрын
Very good explaination of intuition! it helped a lot today! Thanks...
@kevintamakuwala
@kevintamakuwala Ай бұрын
@@sahilsapariya5924 thank you so much 😊
@it077brijpatel2
@it077brijpatel2 2 ай бұрын
Great explanation 👌
@kevintamakuwala
@kevintamakuwala Ай бұрын
@@it077brijpatel2 thank you so much 😊
@it077brijpatel2
@it077brijpatel2 2 ай бұрын
Great explanation 👌
@kevintamakuwala
@kevintamakuwala Ай бұрын
@@it077brijpatel2 thank you so much 😊
@uditmehta5719
@uditmehta5719 2 ай бұрын
Nice explanation
@kevintamakuwala
@kevintamakuwala Ай бұрын
@@uditmehta5719 thank you so much 😊
@uditmehta5719
@uditmehta5719 2 ай бұрын
Nice explanation
@kevintamakuwala
@kevintamakuwala Ай бұрын
@@uditmehta5719 thank you so much 😊
@yosansu
@yosansu 6 ай бұрын
looks great! how are you handling concurrent submissions? are you spawning separate docker containers for each submission?
@kevintamakuwala
@kevintamakuwala 6 ай бұрын
No, actually I am creating temporary files on EC2 on each submission request. Thereafter, I am compiling code with input{hash}.txt on my EC2 instance and then storing output in output.txt file and then returning output{hash}.txt content as response, if no compilation error. I am deleting the created files afterwards. In this way, I am handling concurrent request. Limitations in this approach may be: - On thousands of requests simultaneously, system may crash due to single instance and lesser RAM capacity. Is there any more efficient way of handling concurrent requests to serve the purpose?
@yosansu
@yosansu 6 ай бұрын
@@kevintamakuwala Looks cool. I was wondering that the runtime for processing submissions would then depend on the number of concurrent users, right? In case I submit my problem during a contest, time limit might exceed if compared to the time if I submit when no one else is submitting 🤔
@kevintamakuwala
@kevintamakuwala 6 ай бұрын
@@yosansu Exactly, it would depend on number of users indeed. I have thought of this problem earlier, but currently at this point of time, I am not concerned about TLE, MLE checks. Even O(N!) would pass the test cases. Maybe I can implement it as soon as I get to know about the feasible solutions. One possible solution could be creating threads and running a submission of a user on a single allotted thread. Any suggestions?
@we_r_sanatani_Hindu
@we_r_sanatani_Hindu 7 ай бұрын
Great. Can you please help me know where have you implemented the part that validates the code of user against the output required?
@kevintamakuwala
@kevintamakuwala 6 ай бұрын
After compilation, I am getting the output of the submitted code submitted as my response, which I am matching against the expected output in CodeEditor component. If any one of the TC fails, I prompt WA msg to the user.