[a / b / c / d / e / f / g / gif / h / hr / k / m / o / p / r / s / t / u / v / vg / vm / vmg / vr / vrpg / vst / w / wg] [i / ic] [r9k / s4s / vip] [cm / hm / lgbt / y] [3 / aco / adv / an / bant / biz / cgl / ck / co / diy / fa / fit / gd / hc / his / int / jp / lit / mlp / mu / n / news / out / po / pol / pw / qst / sci / soc / sp / tg / toy / trv / tv / vp / vt / wsg / wsr / x / xs] [Settings] [Search] [Mobile] [Home]
Board
Settings Mobile Home
/g/ - Technology


Thread archived.
You cannot reply anymore.


[Advertise on 4chan]


File: Screenshot.png (102 KB, 766x815)
102 KB
102 KB PNG
What makes you think you deserve a comfy six figure job if you can't solve something this basic?
Why shouldn't AI replace you?
>>
>>107253376
I'm not reading all that shit. You're gonna have to summarize it with AI.
>>
>>107253376
tbf, if I only read the examples and nothing else this would have taken me at least 5 less minutes to figure out.
>>
>>107253376
Barely read it, I can do this very easily. But only because I grinded the shit out of leetcode and codeforces and hence can solve this kind of problem in my sleep.
I'm still a stupid low IQ.
>>
I got filtered by a question where the dynamic programming solution was significantly easier than the brute force solution.
made me want to kms.
>>
>>107253376
Do it then. Replace people with AI that can solve every leetcode problem it's a great idea!
>>
Those are all second semester combinatorics puzzles it makes me smirk that wannabe codemonkeys are subject to this for basically no reason
>>
americans and their stupid leetcode lmao
>>
>>107253376
Because I'm being hired for my domain expertise and knowledge, not for studying retarded puzzles. I get hired because other people at the business don't have time to either learn or do the work I already know how to do.
>>
I just don't care about your toys that don't even relate to computers.
Math puzzles and katas are for people who aren't interested in actual code and just want to do puzzles.
If what you're writing isn't going into a program I can run on my own computer, and one I would LIKE to run on my own computer, it's worth less than shit and an AI, aka another indian, can do it for you. Hope he and his 50 cousins eats your paychecks right into bankruptcy.
>>
File: 1656008360759.jpg (27 KB, 403x403)
27 KB
27 KB JPG
>>107253376
My company went on a hiring spree last year and hired a bunch of leetcode guys who aced all the interview questions. They've all quit and got better paying jobs at other companies and now our code base is left full of bugs.
>>
File: subcand.png (22 KB, 391x135)
22 KB
22 KB PNG
welp, here it is
came up with my own algo tho, non-recursive
>>
>>107253376
what is the use case of your fucking puzzle
>>
```java
class Solution {
List<List<Integer>> combinationSum(int[] candidates, int target) {
Set<List<Integer>> res = new HashSet<>();
findSolutions(
Arrays.stream(candidates).boxed().toList(),
target,
new ArrayList<>() ,
res
);
return res.stream().map(x -> x.stream().toList()).toList();
}

void findSolutions(
List<Integer> candidates,
int target,
List<Integer> combination,
Set<List<Integer>> solutions
){
var sum = combination.stream().mapToInt(x->(int)x).sum();
if(sum > target)
return;
if(sum == target && unqiue(combination,solutions)){
solutions.add(combination);
return;
}
for (var n : candidates){
var newCombo = new ArrayList<>(combination);
newCombo.add(n);
findSolutions(
candidates, target, newCombo, solutions
);
}
}
boolean unqiue(
List<Integer> solution,
Set<List<Integer>> solutions
){
var unqiue = true;
var f1 = new HashMap<Integer,Integer>();
for(var x : solution){
var prev = f1.getOrDefault(x, 0);
f1.put(x, prev + 1);
}

for(List<Integer> existingSolution : solutions){
var f2 = new HashMap<Integer,Integer>();
for(var x : existingSolution){
var prev = f2.getOrDefault(x, 0);
f2.put(x, prev + 1);
}
if (f2.equals(f1)){
return false;
}
}
return unqiue ;
}
}
```
>>
>>107253376
With a max target of 40, this is far too easy to brute force.
>>
>>107253376
useless problem, real world programs rarely need to use combinatorics functions
>>
File: 1763516761610.jpg (74 KB, 481x645)
74 KB
74 KB JPG
why you need math to create programs.
>>
File: carbon.png (273 KB, 1718x1354)
273 KB
273 KB PNG
>>107253376
That's all?
>>
>>107261036
wew
>>
>>107253376
These can be solved by AI slop.
Write a solution to a proven NP-Complete problem of which many exist in CS and industry. Try and optimize that as best as possible and justify your cost model. No Jeet-GPT AI can do that and never will because all it does is recycle code it scraped off some shitty stackexchange post
>>
File: 1747276364314134.png (150 KB, 1737x1085)
150 KB
150 KB PNG
Programmers are cunts.
They spend all day whining on 4chan they can't get employed when even an LLM can see why nobody wants to employ them. Slop or not: it's the fucking truth.

Jam that log file up your ass you fucking fetishist. I do not consent.
>>
>>107253376
>What makes you think you deserve a comfy six figure job
I deserve a comfy 7 figure job
>if you can't solve something this basic?
I can solve that
>Why shouldn't AI replace you?
It should once it's better. It's not yet.
>>
>>107259622
1/ 52mph
2/ 1.333 yards i.e. 4 feet
3/ 18
4/ $8190
5/ 66
6/ 1/3
>>
>>107261036
I'm in awe and envious of you
>>
>>107253376
The solution is the subset of the cross product between the distinct array against itself where the numbers sum to target, so we’d want to find an implementation of this solution with the fewest number of repeated calculations— this solution likely exists and has been proven already; we just need to look it up on Google or some algorithm db/research paper. Now give me $400,000
>>
>>107253376
>retarded jeets and chinks who have wormed their way into leadership positions, biologically incapable of exhibiting any sort of coherent judgement of personality and fit based on discussion of professional/academic accomplishments outside of the context of an exam, instead appeal to exam-like questions which are totally disconnected from workplace tasks.
really makes you think.
>>
>107262634
>AI text
>>
>>107253376
Grinding LeetCode could've landed you a job in 2020. Since then every tech company overhired and did mass layoffs, now you're competing with thousands of applicants with FAGMAN on their resume. Market's flooded.
>>
>>107262484
Well, it's not really that hard. Study algorithms and do advent of code/leetcode and you will notice patterns in the solutions. It's only matter of getting the intuition to divide and tackle these problems using couple of different tricks.
This one was not even optimized in any way, I would even consider this brute force approach.
>>
>>107253376
>Two combinations are unique if the frequency of at least one of the chosen numbers is different
who the fuck wrote this???
first of all, two combinations are DISTINCT, not unique. For them to be UNIQUE they would have to be DISTINCT from all other combinations.
second, just say that they are distinct if they have different values, ignoring order. nobody thinks in terms of values and frequencies. This is programming everyone will envision this as an array in their mind and even the examples depict the combinations as arrays

also honestly fuck combinations/arrangements/permutations and other similar crap, they have so many slightly different definitions (with/without repetition, ordered/unordered...) and very differing implementations...
>>
>>107253376
is this considered a hard leetcode problem?
>>
>>107253376
in haskell this is just
import Data.Foldable
import Data.List

combinationSum candidates target = go target [] (sort candidates)
where
go 0 res _ = pure res
go _ res [] = mempty
go n res (x : xs)
| x > n = mempty
| otherwise = [0 .. n `div` x] >>= \amt ->
go (n - x * amt) (replicate amt x <> res) xs

-- test cases
main = traverse_ (print . uncurry combinationSum)
[ ([2,3,6,7],7)
, ([2,3,5], 8)
, ([2], 1)]
>>
>>107253376
Imagine spending a good chunk of your life learning how to solve problems that are now immediately solved by AI operated by brainlets. Thank God I forked my career years ago, you guys are so fucked, it's not even funny.
>>
>>107253376
I could do it, but I don't feel like it so I'll just have AI do it for me. I'm not taking a freshman year python class anon, I'm a professional now that means I shitpost on my phone at my desk and barely do any work.

I just know enbough to keep my job and never divulge my secrets, intentionally add a bug that only I know how to fix so every year it pops up and makes my managers think I'm smarter than I really am.
>>
>>107253376
problems like these are completely pointless and i refuse to believe anyone who graduated from uni thinks there's value in doing these. don't waste your time, go actually learn something, go for a walk, jerk off, do anything else
>>
>>107253376
This shit is how you get cs graduates that don't know how big a pointer is



[Advertise on 4chan]

Delete Post: [File Only] Style:
[Disable Mobile View / Use Desktop Site]

[Enable Mobile View / Use Mobile Site]

All trademarks and copyrights on this page are owned by their respective parties. Images uploaded are the responsibility of the Poster. Comments are owned by the Poster.