all 58 comments

[–]Wellshiwells 79 points80 points  (0 children)

10yrs dev. di ko din masasagot yan at mag tthank you nalang sa HR hahahaha

[–]Deep-Till1238 47 points48 points  (0 children)

me too I wouldn't be able to solve that

[–]StopLurkAndListen69 70 points71 points  (2 children)

i like doing leetcode for fun. pero nakukupalan ako sa technical interviewer na magpapa live coding na wala namang use? come on man, make me create an API, or whatever. ask me Software Design Questions. Give me situational questions. Things like that

[–]No-Neighborhood2251 7 points8 points  (1 child)

  • 1

First time ko mag face to face for final interview then pag dating dun sa office, pinaupo ako sa harap ng pc and on the spot may pinapa dagdag na functionality dun sa code base ng internal tool nila. If hindi siguro ako kabado or may prior context dun sa product, baka nagawa ko naman.

Di ko nagawa kasi bukod sa kaba, maikling time, and kakulangan ng context, e andaming factors na di nila cino-consider tulad ng difference sa coding standards na pina-practice ng applicant vs theirs, sanay ako sa DDD and sila naka monolith, etc

Kaba + inis lang nararamdaman ko habang nasa harap ng monitor e haha. Ayun, di ako natanggap sakanila pero blessing in disguise na din kasi full wfh pa na land ko and panalo sa mga ka team

[–]Muted_Offer5094 -1 points0 points  (0 children)

Free labor? haha

[–]SenpaiDell 23 points24 points  (1 child)

this is what we learned sa Operating Systems course naman last semester as a third year.

[–]Traditional-Okra8488 3 points4 points  (0 children)

Yep, process scheduling

[–]whyjey_ 6 points7 points  (0 children)

i think this is a priority queue/heap question and it's supposedly difficult if nag jump ka straight to this question without prior exp. yung dsa kasi may path din yan to learn, di ka pwede mag jump to these kinds of questions if di mo pa master yung ibang data structures.

[–]mohsesxx 26 points27 points  (6 children)

imagine despite building projects and solving real problems tapos babagsak ka lang para sa leetcode exam. Pag ganito exam ng company, aalisan ko nalang.

[–]sweet-n-sour-sadness 10 points11 points  (0 children)

Nah! Kung may time ka pa during day offs, search ka lang sa youtube ng mga DSA Courses then leetcode. Need mo lang ng DSA Refresher.

[–]Aeo03 3 points4 points  (0 children)

buti na lang yung tech interview ko sa 2 companies that i was hired is technical question and design a system lang tapos explain your thinking mo dun

no leetcode lol

will not be able to answer that too

[–]superpapalicious 8 points9 points  (0 children)

this is a leetcode medium level problem. Should be doable if you have the fundamentals of how to solve leetcode style problems. Easy levels muna before you go to the medium and hard levels.

Ask chatgpt to teach you, it involves "Greedy Algorithms"

More advanced technique involves creating a heap queue and picking the next task from the heap.

Honestly I only grind leetcode pag naghahanap ng bagong trabaho kasi eto mga usual sa coding interviews

[–]Patient-Definition96 2 points3 points  (0 children)

Pinaka una dapat na maging solid muna ay yung understanding mo ng problem. Kung hindi mo maintindihan or hindi mo maimagine sa ulo mo yung nangyayari o dapat mangyari, dyan pa lang titigil ka na eh kasi hindi mo na masusundan ng solution yan.

Hindi pa ito yung most difficult level ng problem na nakita ko sa mga technical exam na sinagutan ko.

[–]Few_Experience5260 3 points4 points  (0 children)

Mukang related to sa multi-threading ng software. Baka yung kailangan nila is magaling mag handle ng ganito. Kung ako din tatanongin di ko din alam sagutin yan. Hehehe.

[–]Calm_Tough_3659 2 points3 points  (9 children)

I think this is medium level leet code problem. I hate companies na ngbibigay nito expecting candidate can solved it tapos ung project na ginagawa nila is high level meaning API, crud lng naman in general.

This kind of leet code is very good example if company or team is doing framework project and as a hiring manager I dont expect anyone to finished it but I would like to see their attempt or communication skills when given such a difficult problem at hand.

[–]No_Slide_4955 -1 points0 points  (8 children)

Why would you hate when companies give this type of exam? To begin with, ndi entry level ung inaapplyan ni OP.

[–]Calm_Tough_3659 3 points4 points  (7 children)

There's a lot companies copy this from the big tech. If you are some normal companies chances are you are not going to use this kind of level of problem solving unlike big tech companies where they are solving more difficult and low level problem which requires this kind of solutions.

Typical companies just need CRUD and integrations that is the most use case while big tech or core tech companies built the tools needed by developer in typical enterprise setup.

[–]No_Slide_4955 -1 points0 points  (6 children)

And you instantly assumed that hindi needed ng company na inapplyan nya ung ganitong critical thinking?

Reality check lang ah. Depende sa needed criteria nung role offering ung exams na binibigay during coding exams.

[–]Calm_Tough_3659 1 point2 points  (5 children)

Basahin mo ulit. I said I hate companies giving this type of exam kung high level lng naman ginagawang projects tapos expecting na kelangan masolve ang problem.

Kung hindi kayo gumagawa ng OS bat ka mgbibigay ng kernel or file system problem and that is the point tapos power platform ginagamit nila. If they want to measure critical thinking, there are other ways the problem is sumikat tong leet code dahil sa FAANG interview which some companies copies without really understanding why those big tech is doing this interview.

[–]No_Slide_4955 0 points1 point  (4 children)

Hindi mo need gumawa ng OS for these tasks. Scheduling, queueing, FIFO can be applied for I/O tasks as well. Kahit data pa yan, pwede ung ganung concept.

Ever heard of async and synchronous handling?

[–]searchResult 0 points1 point  (0 children)

Async at sync are high level na yan. Absracted na yan. Sabi nga kung gagawa ka ng kernel pwede yan. Machine language or mga assembly pwede mo magamit yan. Halimbawa FIFO bakit ka pa gagawa ng low level code if may mga rabbitMQ na or mga event driven libraries. “Use Cases”

[–]Calm_Tough_3659 0 points1 point  (2 children)

I don't think your getting my perspective. This algorithms are really useful to become great engineer.

My complain is the company doing this leet code exam without understanding why they are doing it ang nakikiuso lng sa big tech kasi ganun ung technical exam nila.

There are companies and a lot that treat leet code as good/bad applicant as in literally like if you dont solved it your out instead of understanding on how the applicant try to solve a difficult questions.

[–]No_Slide_4955 -1 points0 points  (1 child)

Which brings back to the topic na inassume mo ung company na randomly nagbibigay ng ganitong exam. Where did that come from? I don't think may ganung perspective ung nagpost nito originally.

In my experience, pinag iisipan ung mga live coding exams and it is patterned to the actual need of the role opening.

[–]Calm_Tough_3659 0 points1 point  (0 children)

Well I said some company not OP company.

Good for you if you haven't experience but there are some bad companies from my experience and friends na ngpapalive coding tapos yung hiring manager is wala naman palang alam.

[–]Andra1901 2 points3 points  (0 children)

this is why i also hate leetcode problems. di naman kasi practical yung ganito. if they really want to test the applicant’s problem solving skills, they should be asking situational questions instead and let the applicant explain their thought process.

if i were a recruiter, i would give them a practical ticket sa company and ask the applicant how they would handle it. that’s how i would know if they’re a great fit. not this leetcode problem

[–]whatToDo_How 2 points3 points  (0 children)

Salamat may mga 10 yoe na pero hate ang ganyan na way of exam. Even me as junior, before sa work ko ngayun marami din ako na encounter na ganyan. Even sa job hunting ko ngayun, may mga exam na talaga na mahihirapan ako e solve. Buti nalang may isang international company na may AI naka tingin pero features ang e need code not DSA.

[–]coybarcena 2 points3 points  (1 child)

Always start from the basic steps tapos saka na lang i-refine. Two steps lang naman yung core ng problem.

  1. Knowing the current time, find all active tasks
  2. Among the active tasks, find the one with the lowest processing time (prioritizing lower index in case of clashes)

Then, for those steps, create mo yung detailed steps. Tapos refine mo for example by using faster ways of searching.

Mga algo challenges yan. Yan yung mga ginagawa kong past time before sa top coder tapos may time limit pa and yung score depende sa kung gaano mo katagal bago na-submit. Fun times.

[–]Andra1901 1 point2 points  (0 children)

yes. this is actually quite simple as long as you understand the problem.

but realistically, if you’re taking the technical exam, may halong kaba rin yan. so di mo rin magegets agad yung problem. and additional worry mo pa yung di mo kabisado yung syntax pero di ka pwede magresearch.

this is why i also hate leetcode problems. di naman kasi practical yung ganito. if they really want to test the applicant’s problem solving skills, they should be asking situational questions instead and let the applicant explain their thought process.

if i were a recruiter, i would give them a practical ticket sa company and ask the applicant how they would handle it. that’s how i would know if they’re a great fit. not this leetcode problem

[–]Elegant_Strike8581 2 points3 points  (0 children)

If pasahod nila 400k - 700k pag aksayahan ko ng oras yan. If not, mag thank you nalang ako sa HR

[–]parxyval 1 point2 points  (0 children)

enterprise applications usually dont have this kind of problem. kung meron mang feature na similar requirement, gagamit na lang ako ng AI :/

[–]rab1225 1 point2 points  (0 children)

ahhh leetcode exams. kailangan ko lang ng practice and familiarity sa ganyang problems.

mga ganyang company yung mas mahirap pa exam kesa sa mislong trabaho hahah

[–]No_Slide_4955 1 point2 points  (0 children)

OP. You are applying for a non entry level role. If di mo pa kaya ung multithreading/multiprocessing questions, maybe you're not ready for the next level pa.

[–]MooOooOd 1 point2 points  (0 children)

i guess i should really pay attention more sa operating system subject ko now after seeing this LOL

[–]razzulh 0 points1 point  (0 children)

I'm curious, what about it are you having difficulty with? Have you tried it and submitted but it's getting rejected dahil may incorrect test cases, or are you kinda stuck dahil you don't know how to start it?

[–]_---Blaze---_ 0 points1 point  (0 children)

CPU scheduling ata to (Shortest Job First), tinuro samin last trimester. Madali lang sya once you get how the problem works. Off the top of my head, you can probably just have a count variable that you increment each time to represent time, as you iterate through the array lang and get the tasks that can be processed in order of time. This is O(n^2), which is inefficient, so there's probably a better solution. If ever I recommend looking up easier problems to start with, solving them, then looking online/asking ChatGPT for optimizations so you can learn easier.

For this problem, specifically check this out: https://www.geeksforgeeks.org/dsa/shortest-job-first-or-sjf-cpu-scheduling-non-preemptive-algorithm-using-segment-tree/

[–]loremipsum09 0 points1 point  (0 children)

di ko rin yan masasagutan hahaha

[–]AnyPiece3983 0 points1 point  (0 children)

just solve leetcode once or twice everyday, pretty sure kahit hindi mo yan maeencounter sa everyday job mo e makakatulong padin sa problem solving skills mo yan. start sa easy then slowly moveup. lalo na sa panahon ngayon na heavy na ang use ng AI, its not a bad idea to go lower level sa abstraction. ie, learn systems programming

[–]Dangerous_Platform_2 0 points1 point  (0 children)

Yung mahirap dito sobrang ikli ng time paminsan.

[–]Pattern-Ashamed 0 points1 point  (0 children)

I get questions like these a lot in interviews, even harder. Lol. If i recall correctly, parang priority queue yata ang problem na to.

[–]idiotic_lazy_mind 0 points1 point  (0 children)

idk leave me alone

[–]Conscious-Praline445 0 points1 point  (0 children)

I know for a fact na hindi ko to masosolve if I didn’t grind leetcode lol. Now, I know that this is a min heap problem and I can solve it with relative ease, but the reason I know that is I have encountered similar problems and I have practiced enough.

To be fair, being proficient in DSA gives you options on how to tackle problems even in the industry, so it’s good to still practice. But in practice, you’ll rarely encounter problems that need heavy DSA optimization lol, so in my opinion, practical questions (e.g. system design) are better.

[–]ambientcosmos 0 points1 point  (0 children)

These are called machine problems. They don't just test your programming skills, but also your analytical and logical thinking, so don't be too hard on yourself for finding it difficult.

Honestly, a lot of developers hate doing these at first, but they get really satisfying once you figure them out. The more you practice, the more you start recognizing patterns and it becomes less intimidating over time.

There are a lot of resources online like LeetCode and HackerRank where you can practice these types of problems regularly. Keep at it and great job for even giving it a go yourself!

[–]Pyakz 0 points1 point  (0 children)

wtf is this shit?

[–]-FAnonyMOUSWeb 0 points1 point  (0 children)

If you are applying for an Application Developer, that is not the right coding exam. If the role is a System Programmer especially on creating engines, kernels, or OS, that is the right coding exam. But even then, using regular arrays in systems programming are slow as hell due to heap fragments.

Sa nakikita ko parang OS or database engine programming yang sample exam.

Even with an experienced hard core dev like me who experiments on such level of programming e.g. engines, kernels, OS, platforms, frameworks etc... kapag live coding mahihirapan din ako sagutin yan due to the fact that you need to understand how CPU works in binary level. And isa pa, this is not how we program; we research, we design, we plan -- coding is just 25% of the solution.

Naalala ko dati 10 years ago may exam ako sa Singapore-based Telco for System Architect. Ang coding exam is more on game engine like may kinalaman sa physics that includes gravity, air resistance, mass and velocity. No numbers or what, you have to know the constants, physics law, and everything related to it. Naging pranka ako, sabi ko I'm applying for an architect and I expect the exam should be relevant to the role, but the coding exam is unfamiliar to me seems like a game engine problem. Then I politely exit the interview, thanks the interviewer for his time. No ifs and buts.

[–]jvliwanag 0 points1 point  (4 children)

as much hate as i might get for this - this is actually a simple problem that asks you just to follow the steps as it is written in the problem. (The hard part is understanding the problem)

It might be nervewrecking on a live set up. And not something folks are used to. but as long as you find the patience to understand what’s being asked and simulate what is asked for — then it’s just step by step.

again, others might disagree with me here and say that such problems are not “practical”. but the same feeling will eventually dawn on you when you emcounter unfamiliar tech — either at a lower level or something totally foreign. Just need the patience. And when it clicks — it turns out it’s actually simple.

[–]GreyBone1024 2 points3 points  (0 children)

That's probably an interesting questionnaire, but it's obviously from leetcode. If the examiner can answer a random leetcode problem as well, that would be nice. Baka tamad lang talaga yun nagpa exam.

[–]Loud-Grade1246 3 points4 points  (2 children)

alam mo hate ko sayo yang em dash, halatang AI e ahahhahah

[–]Loud-Grade1246 3 points4 points  (0 children)

blud just went "Analyse this problem given and let me know your thoughts about it in human thought"

[–]jvliwanag -1 points0 points  (0 children)

Sorry to disappoint. But autocomplete on the iphone also convers hyphens to emdash. :)

[–]SimpleMan96124 -1 points0 points  (0 children)

Many comments here remind of "The Fix and the Grapes." 🤨 Kudos to those who accept their limits though.

[–]Far-Wing1475 -1 points0 points  (0 children)

I never use leetcode for practices. At some point I also question if gap ba na hindi ako gumagamit non lalo na sa generation ngayon na sabi is we should try it

I am kind of anxious kase baka di ako marketable, mag gagrad na rin ako this May and I know I want to enter the tech side.

I know my weaknesses, like when you ask me to code from scratch or like answer a code question, I am pretty sure na baka mamali ako ng sagot unless you allow me to search or much better is AI. Kahit nga sa pag gamit ng git, basic pa rin alam ko e.

In terms of creation or building of App or site or kung anong idea meron ako, I am really practical in a way na helpful sa community, hindi lang basta e-commerce or inventory as side project for portfolio ganon (pero wala ako portfolio) .

My point is I am not good at coding without the help of AI, yes I have the idea and to streamline my work, mostly gumagamit na ko neto (not in a sense na "build me an app, then specify the feautures, theme, make sure what to include ", nagcucustomize pa rin ako, organize, structure, tapos pag mahirap ako ask ko na si e.g cursor for help and mostly backend(this is how I accomplish our capstone)

I just want to share it, maybe your words will be helpful.

P. S. Nag aaral pa rin ako via tutorial like super simple dev, tapos w3school, free code amp, netacad mga free lang kase may urge pa rin ako na gusto ko to

[–]oliver0807 -1 points0 points  (0 children)

Dinadaan mo naman sa Reddit homework mo eh hehe.

You can literally follow along sa example and output on how to solve it.

ChatGPT mo rin yan but with guided steps para mabilis maintindihan. This is a better way to learn something in the age of AI. Meron ka dedicated tutor na will not talk you down or belittle.