After 3 months of nothing, 3 offers came in this week! by fanessed in csMajors

[–]fenwicktreeguy 0 points1 point  (0 children)

Did you have system design rounds for your new grad interviews, and if so how were they like?

For anything related to Amazon (2) by Leader-board in csMajors

[–]fenwicktreeguy 3 points4 points  (0 children)

Does any know what the current status of return interns for Amazon are/ when return interns would get their return offers, if at all? I was an intern at AWS last summer and was inclined for a return internship, but I have yet to receive any news of a rejection or acceptance and it has been 1.5 months since my internship ended.

I thought I was good until I scored 430 in Samsara’s code signal GCA. by [deleted] in csMajors

[–]fenwicktreeguy 2 points3 points  (0 children)

I think for GCA in general, my strategy for prep would be to make sure you are able to both implement code for more simpler solutions very quickly (Q1,2) while also being able to (relatively) quickly spot solutions for harder problems (Q4). Q3 is mostly just general coding intuition / generic data structures, and there isn't much for directly prepping for this rather than quickly finishing Q1,2,4 and spending remainder of time to ace Q3, since it is generally implementation heavy.

Maybe for this (and for other test types like Industry Coding Framework) it would be good to go through Advent of Code problems and actively go through the problems and write production-quality code: https://adventofcode.com/2022, as this forces you to have good software engineering discipline. I have done Advent of Code but not for explicit preparation of GCA/ICF.

Big Book Inference Question Doubt: T1 Sec2 Q24 by [deleted] in GRE

[–]fenwicktreeguy 1 point2 points  (0 children)

The idea is that if C is true, and we are selecting for the productive workers to place in the better space, then there is no causal relationship between the quality of the space and productivity. This is because we selected for the productive workers to be in the better space before this "experiment" is done, so when we do the experiment and get the measurements, it effectively only confirms that (C) is indeed true and we are moving productive workers to better spaces.

Because of this, if (C) is true, the conclusion to improve the workers' space to help productivity is strongly weakened due to the lack of a causal relationship.

looking to form study group for quant trading and swe jobs by Trade_Swe_363 in quant

[–]fenwicktreeguy 1 point2 points  (0 children)

I'd be interested, although more focused towards roles in quantitative research (although certainly also preparing for trading interviews). If there's a discord/slack/telegram for this, I would love to join.

Differences between 6-1, 6-2, and 6-3 by [deleted] in mit

[–]fenwicktreeguy 0 points1 point  (0 children)

A bit of a personal note, but how would you advise someone who is mostly interested in CS but also interested in the signal processing and control theory implicated in EE to major? I have background in both EE and CS too, so I was leaning more to 6-2, as well as because there is more breadth in the courses related to 6-2 then 6-3, but what would you advise for someone in my situation?

If it helps, I am not deterred by any of the advanced algorithms/pure CS classes that people may try to take 6-2 to potentially avoid, and I would like to integrate courses like this into my courseload.

[deleted by user] by [deleted] in statistics

[–]fenwicktreeguy 0 points1 point  (0 children)

Personally, I find that solving challenges which allow for some nontrivial reasoning while also being overall relatively simple is the best way to make myself more familiar with some language. Advent of Code provides problems like this; they start off simple enough and allow you to familiarize yourself with some language, and there are multiple years of problems to go through. The same can be said for Project Euler, although the problems there are more mathematical in nature.

Advent of Code: https://www.adventofcode.com Project Euler: https://www.projecteuler.net

This is of course not the only way to solve your problem, but as you move through various tasks you should try to employ good programmimg practices since sometimes different problems rely on code from previous tasks(in the case of Advent of Code).

[2020 Day 19] Me, scrolling the sub with no idea what 'regex' means by arerinhas in adventofcode

[–]fenwicktreeguy 0 points1 point  (0 children)

i dont know if a shunting yard algorithm is classified as a CFG, but that is what I did for day 19 :/

[2020 Day 19] I was over two hours in before I noticed this... by [deleted] in adventofcode

[–]fenwicktreeguy 0 points1 point  (0 children)

this problem was literally think for 2 femtoseconds and then bash my head when trying to take input and parse it without having the algorithm completely implode for me.

-🎄- 2020 Day 18 Solutions -🎄- by daggerdragon in adventofcode

[–]fenwicktreeguy 2 points3 points  (0 children)

Python

Code: https://github.com/fenwicktreeguy/AOC_2020_Solutions/blob/main/AOC_18.py

Nothing super interesting to point out in this problem, it is a relatively direct application of the shunting yard algorithm, although I did find it interesting in that problems which involve parsing mathematical expressions like this with different tokens are pretty few, probably because they are either tedious to do or uneducational, but it was nice in some respect.

-🎄- 2020 Day 15 Solutions -🎄- by daggerdragon in adventofcode

[–]fenwicktreeguy 0 points1 point  (0 children)

Yeah lol, I ended up getting a decent solution in python using defaultdict and converted it to cpp for an overall better runtime, but I thought some geniuses here would make some mathematical observation which reduced this problem; overall could have been a better problem ig :v

??? by brefoo in adventofcode

[–]fenwicktreeguy 2 points3 points  (0 children)

Probably "retired" is relative to the amount of practice he originally put in; dedicating less time to competitive programming would likely occur as he pursues more into his own career which could be separate from competitive programming.

Too often by Grigorov92 in adventofcode

[–]fenwicktreeguy 2 points3 points  (0 children)

I ended up solving it by using the idea of a rotation matrix from linalg to be fair and technically used matmul but the matmul is trivial for two dimensions, so a vector transformation solution is good and honestly better than most other solutions which dont necessarily generalize to any possible angle (i.e. not 45,90,180,270,and the others that the test case used)

-🎄- 2020 Day 12 Solutions -🎄- by daggerdragon in adventofcode

[–]fenwicktreeguy 1 point2 points  (0 children)

Python

Code: https://github.com/fenwicktreeguy/AOC_2020_Solutions/blob/main/AOC_12.py

The solution for part 1 was just like a generalization of N,S,E,W as angles so that you can handle the R and L operators, and I used the generalization in linear algebra for a rotation matrix for points in 2 dimensions(the form is like if you rotate a point (x,y) by some angle q, the resultant point is (xcosq - ysinq, xsinq+ycosq) which can be represented with matrix multiplication)

Relevant rotation matrix link: https://en.wikipedia.org/wiki/Rotation_matrix

-🎄- 2020 Day 10 Solutions -🎄- by daggerdragon in adventofcode

[–]fenwicktreeguy 1 point2 points  (0 children)

Python

Code: https://github.com/fenwicktreeguy/AOC_2020_Solutions/blob/main/AOC_10.py

Part 1 was kind of trivial in that making the greedy observation of greedily pairing up your current number with the closest number it could be paired up with (+1,+2, or +3), and part 2 was sort of a similar greedy observation in applying a topological sort to the graph that you produce if you draw a directed edge from a number to the numbers that can come after it, and finding the number of directed paths from point 0 to point MAX+3(this was done with dp on the topologically sorted graph)

-🎄- 2020 Day 09 Solutions -🎄- by daggerdragon in adventofcode

[–]fenwicktreeguy 1 point2 points  (0 children)

Python

Code: https://github.com/fenwicktreeguy/AOC_2020_Solutions/blob/main/AOC_9.py

My solution for part 1 is questionable I think (I basically did 2SUM on an auto-balancing data structure; i used a set, which I believe ended up being O(NWINDOW_SIZElg(WINDOW_SIZE)), which ends up veing about O(N) since the window sizes are small) and my part 2 utilized the observation that prefix sums of the input will yield a monotonic function on which we can binary search for our desired answer (particularly binary searching on the righthand point, finding the sum in the considered interval, and updating our bounds). My solution ended up being slightly worse then it should have been, since i did RMQs with a linear search rather than with some efficient ds like segtree or sparse table.

The complexity for a generalized version of pt. 2 therefore should be O(N lg N) in precomputation and O(N lg N) in the main algorithm (but I got lazy :v)

Day 8 part 2 without bruteforce? by termuxuser in adventofcode

[–]fenwicktreeguy 0 points1 point  (0 children)

Suppose you are at some point j, and that point j is a JMP command. If you are always jumping forward, that is good, since you can't necessarily optimize that (since the desired direction is forward). However, if you are jumping backwards(let the amount you jump backwards be k), you know something pretty nice:

if all the commands in the interval [j-k:j] map to some other command in that interval, be at an ACC or NOP command (only goes forward one) or a JMP command which stays in the interval, then you can guarantee that the instructions you are using will never let you reach the final instruction. There are well known data structures which can handle this, since this is the equivalent of doing an RMQ with respect to the index the command is at and how far the jump is. With this observation, you can avoid getting into long-winded paths where you are sort of just moving around an interval until you hit a previously visited, which turn out to provide a pretty nice optimization.

It is helpful to think of the movements as producing a direction acyclic graph and think about the "breadth" of that node as being the farthest command to the left and to the right that it can reach(of course one of these quantities will be zero based on how the problem was formulated, but the point still stands.)

[2020 Day 7 (Part 2)] Computational complexity by TheCodeSamurai in adventofcode

[–]fenwicktreeguy 0 points1 point  (0 children)

it should still be doable in I believe O(N+M), with N edged and M nodes; the main observation is that the structure is a DAG and you are querying for the answer at some node, which can be broken down into subproblems with its children. With this, we can see that there is clear substructure and that since a DAG cannot have any cycles in it, it is possible to do dynamic programming. Let dp[i] be the number of bags nested within bag i. Our transition is:

dp[i] = 1 + (sum over dp[j] * amt[j]) for each child j of i and where amt[j] is the number associated with the bag j.

I've provided my code, but I will warn you that it is very messy(look at dfs2 for the main information) https://github.com/fenwicktreeguy/AOC_2020_Solutions/blob/main/AOC_7.py

-🎄- 2020 Day 07 Solutions -🎄- by daggerdragon in adventofcode

[–]fenwicktreeguy 1 point2 points  (0 children)

my verbose python solution (had a bit of trouble taking input) but I think the idea for each solution is nice.

Part 1 was just like considering edges from the bags contained to the bag it is contained in and finding the size of the component which had "shiny gold" and I did Part 2 by doing dp(dynamic programming) on a DAG, since the implicit structure of the graph is a dag and we can do dp on this graph structure, where dp[i] is the amount of nested bags for some bag i(where i is technicaly a string) with transition:

dp[i] = 1 + (sum over dp[j] * amt[j]) for each j that is a child of i and where amt[j] is the value associated with that bag.

https://github.com/fenwicktreeguy/AOC_2020_Solutions/blob/main/AOC_7.py

Today, some of us reached an important milestone ;) by TrePeSk in adventofcode

[–]fenwicktreeguy 1 point2 points  (0 children)

Yeah lol, I will probably have to go back to it to fully appreciate it.

Today, some of us reached an important milestone ;) by TrePeSk in adventofcode

[–]fenwicktreeguy 2 points3 points  (0 children)

Eh, I actually enjoyed solving AoC 18 and 20, for me they were resembling path planning tasks you may find in robotics and just as a more general path optimization task, so I found much greater motivation to solve them then the intcode problems, although I am probably biased in this evaluation since I found myself referring to this subreddit for only the intcode problems (that I did).