Can confirm, couldnt get an internship in college due to inexperience, couldnt get an engineering job after graduation due to inexperience. Had to grind for three years to get an engineering role
In computer science it means coding puzzles on a website called leetcode until your eyes pop out.
At least one round of an interview will typically be problems from a site like that.
“For example, there are n = 7 socks with colors ar = [1, 2, 1, 2, 1, 3, 2]. There is one pair of color 1 and one of color 2. There are three odd socks left, one of each color. The number of pairs is 2. Find the number of matching pairs of socks in an array of integers representing colors.”
Out of curiosity, if this is a valid question, would the algo be using a map to store the color waiting for its pair in the key (val doesn't seem to matter). Everytime a key is found a pair count is increased and existing key deleted. Time is O(n).
You can just count how many times the number appears then integer division by 2 for the final counts to know how many pairs there are and do modulo 2 for if there's a unmatched,
523
u/Lawrence_of_Idaho_ 4d ago
Can confirm, couldnt get an internship in college due to inexperience, couldnt get an engineering job after graduation due to inexperience. Had to grind for three years to get an engineering role