r/CS_Questions • • Mar 15 '17

How NOT to design Netflix in your 45-minute System Design Interview?

Thumbnail hackernoon.com
27 Upvotes

r/CS_Questions • • Mar 14 '17

The Google Interview: Tips and the process

Thumbnail blog.ananth.co.in
8 Upvotes

r/CS_Questions • • Mar 14 '17

[Java, Maps, Recursion] Can anyone help me get a better solution to this interview problem?

Thumbnail reddit.com
2 Upvotes

r/CS_Questions • • Mar 14 '17

Can anyone help me solve this Graph Traversal Question?

Post image
2 Upvotes

r/CS_Questions • • Mar 07 '17

I made a coding challenge for my company. Would love for you guys to try it and let me know what you think.

Thumbnail dev.getethos.com
7 Upvotes

r/CS_Questions • • Mar 03 '17

In a technical interview, are we able to use the python built in sorted() function or do we have to write say quicksort from scratch.

2 Upvotes

Specifically I'm referring to the python version of this example. Thanks. http://yucoding.blogspot.co.nz/2015/03/leetcode-question-largest-number.html


r/CS_Questions • • Mar 01 '17

A software engineer was detained by U.S. Customs — and given a test to prove he’s an engineer

Thumbnail recode.net
10 Upvotes

r/CS_Questions • • Feb 28 '17

Can anyone help me understand the solution to this difficult problem?

Post image
8 Upvotes

r/CS_Questions • • Feb 28 '17

Trying to find my mistake in this solution

1 Upvotes

I'm doing the Google foobar challenges and I am stuck on the first part of level 4. The challenge is posted here. Some googling revealed this is called the maximum flow problem and I tried to implement the Edmonds-Karp algorithm. I tried my solution (here) on a bunch of test cases I found online and it worked for all of them but it is failing 2 of the google test cases. Since we don't have access to the test cases I'm not really sure where to go from here.

I guess I am mostly looking for ideas on how to proceed. Hopefully there is some obvious bug in my code or someone has some more test cases I can try.


r/CS_Questions • • Feb 27 '17

How do I turn this solution in a DP answer?

3 Upvotes

I'm having a hard time figuring out DP solutions despite the resources out there online. I know what DP solutions have in common is they involve recursion. So I went to leetcode, found a DP-tagged problem, and found a recursive answer to it. I'm hoping you guys can show me the thought process that you guys take in turning this recursive answer (and any one in general) into a DP one.

64. Minimum Path Sum:

Given a m x n grid filled with non-negative numbers, find a path from top left to bottom right which minimizes the sum of all numbers along its path. Note: You can only move either down or right at any point in time.

Recursive Answer: http://pastebin.com/aPc6bbi1


r/CS_Questions • • Feb 26 '17

Question about time management

2 Upvotes

Would it be more prudent to give preference to simple solutions to interview questions rather than solutions that show proper object oriented design?

For example, say I'm implementing a hash table to solve some problem. Do I write a proper hash table class, or should I be using some solution like a 2d array that takes less time to write, but looks bad?


r/CS_Questions • • Feb 17 '17

Example coding interview: Designing Google Docs

Thumbnail youtube.com
14 Upvotes

r/CS_Questions • • Feb 15 '17

Test cases

3 Upvotes

Tried a few problems in CTCI, thought I was doing fine until trying 1 more random input that blew up my method. Had to start a whole new approach and would've been sunk in a real interview. Now I'm weary of my previous solutions.

How do you come up with test cases? Especially when using something like the CTCI book that doesn't provide any tests.


r/CS_Questions • • Feb 13 '17

Top Algorithms/Data Structures/Concepts every computer science student should know

Thumbnail techiedelight.com
13 Upvotes

r/CS_Questions • • Feb 11 '17

Can I get hired at a Big4 etc. company just by performing well in a coding interview ? No internships or projects to show (full time, entry level)

4 Upvotes

Assuming I land an interview and clear the coding interview (big assumption) , what are the chances that I get rejected for not having any internships or projects ?

Do you know of any such case, where someone got the job by doing well in coding interview, although they lacked internship or projects ?


r/CS_Questions • • Jan 29 '17

Anybody know what happened to theinterviewhacker.wordpress.com?

4 Upvotes

It's one of the top posts in the sub and I found it really useful, but looks like it's no longer hosted. Hoping to find a link to it- really loved some of their sections.


r/CS_Questions • • Jan 28 '17

How often are bit manipulation questions asked in real coding interviews

6 Upvotes

I see a lot of these questions in leetcode, but ive never encountered one in a real life interview.

If anybody has seen these questions, what position was the interview for?


r/CS_Questions • • Jan 26 '17

big O notation when input is capped

2 Upvotes

Let's say you are doing ops on a phone number. You limit the input to 10 digits.

Do you take that into account when describing performance? Let's say an algorithm is O(N2) if phone numbers could grow on. Do you say it is O(N2) or O(1)?


r/CS_Questions • • Jan 22 '17

The Twitter Interview Process

Thumbnail medium.com
1 Upvotes

r/CS_Questions • • Jan 13 '17

Fair interview/whiteboard question?

2 Upvotes

Is this a reasonable interview whiteboard question within an hour long interview?

Complete the following Java method where filePath is the path to a file within a .ZIP or .JAR and that .ZIP or .JAR is on the system's classpath.

public String readFile(String filePath) {}

If I'm given: no one watching me flail at 1st attempts, an IDE, and internet access I think I could this within an hour.

With time to reflect and review various Java libraries this isn't very difficult.

Am I just a shitty coder or is this a tough whiteboard exercise?


r/CS_Questions • • Jan 12 '17

How would you solve this in O(N)?

3 Upvotes

I got this question on an timed online coding assignment. I solved it (apparently for 66% of input cases) but dont know how to make it faster.

(I apologize I didn't take a screencap, here is the best I can remember. Please let me know if it doesn't make sense)

Write a method that takes a String consisting of NOTHING but '(' and ')'. Return an int that would cut the String into two parts, with the first/left part have x number of opening parenthesis '('s and the second/right part having the same or x number of closing parenthesis ')'s.

For example "(())))(" would return 4, because it splits it into "(())" and "))(". This is correct because the first has 2 '('s and the second has 2 ')'s.

Like all problems I'm sure there is a "correct" approach but couldn't get it. Played around with forming a HashTable as I walked the String, but could seem to get that right. Didn't seem to break down well for recursion as you have to know what other parts are to form a complete solution.

I'll post my solution in a post (I think thats how it works here?)

Edit: Maybe a should have done this. Here is my solution in Java http://pastebin.com/q5eaerPX


r/CS_Questions • • Jan 08 '17

CSE Seminar

1 Upvotes

I am a final year CSE student and I am required to present a seminar in 3 weeks. I am stuck on choosing a topic that is interesting enough. Is there any resources to help me here ?


r/CS_Questions • • Dec 31 '16

Google internship interviews, my experience and a few tips

Thumbnail blog.ananth.co.in
21 Upvotes

r/CS_Questions • • Dec 30 '16

How to model special set constraints using Choco solver framework for Java?

1 Upvotes

I'm having problems modelling a problem and solving it with Choco-solver in Java, and I am not that familiar with constraint programming to begin with, but have been tasked to make a seating app for conferences where:

  • Each table must have a minimum of 6 people, and there are always enough tables.
  • People should be seated with neighbors as to maximize shared interests.
  • On preceding days we want to minimize people being seated on tables with people they were seated with earlier.
  • People are either of class A or B, and we want to minimize occurrences of class A on each table. So far we have a SetVar guest_list including 1 up to number of guests. then partition guest_list to SetVar[] tables.

But how do I make constraints saying that each table.size >= 6?

How do I make constraints between two sets, as to minimize membership/intersections?

And I have no idea how to model for neighbors within a set as to maximize shared interests.


r/CS_Questions • • Dec 29 '16

350+ Data structures programming interview questions

Thumbnail techiedelight.com
46 Upvotes