Originally posted by: Inspector Jihad
ok this took a while...so appreciate it...
http://img265.imageshack.us/my.php?image=untitled2zw.png][/URL]![]()
Lol. That picture doesn't help. I was referring to the point you had in mind.
Originally posted by: Inspector Jihad
ok this took a while...so appreciate it...
http://img265.imageshack.us/my.php?image=untitled2zw.png][/URL]![]()
Originally posted by: vladgur
inspite of what whiners here might say, these are kewl interview brainstormers. This is not a high school test, you dont have to get all of them right. You probably wont anyways, but if you go in the right direction, if you remember your basic data structures and basic algorithms, you should be able to answer many of them or at least start in the right directions. This shows your problem solving skills much better than your ability to memorize a some language's syntax.
Originally posted by: EKKC
WTF? i rather be unemployed
Originally posted by: mugs
hypn0tik -
what you said: http://pics.bbzzdd.com/users/mugs/imadork1.gif
the correct answer: http://pics.bbzzdd.com/users/mugs/imadork2.gif
I was wrong too... it's more like a square with rounded corners.
(note that it does not look like a square, but it's 41x41 characters)
(I wrote a quick and dirty program to figure it out obviously)
Originally posted by: Minjin
Originally posted by: mugs
hypn0tik -
what you said: http://pics.bbzzdd.com/users/mugs/imadork1.gif
the correct answer: http://pics.bbzzdd.com/users/mugs/imadork2.gif
I was wrong too... it's more like a square with rounded corners.
(note that it does not look like a square, but it's 41x41 characters)
(I wrote a quick and dirty program to figure it out obviously)
I don't know whats wrong, but there's no way our figure can have straight sides. Take a piece of paper and draw a point with a line beneath it. Now draw a line that is equidistant from point to line. It can't be straight because the further you get from the perpendicular line, the longer the line segment from the point gets while the line segment going to the side remains the same.
Mark
(disclaimer: not a math wiz)
HehOriginally posted by: hypn0tik
Never mind.
Originally posted by: mugs
HehOriginally posted by: hypn0tik
Never mind.(I was going to paste a reply, but saw you edited first
)
Originally posted by: hypn0tik
Originally posted by: mugs
HehOriginally posted by: hypn0tik
Never mind.(I was going to paste a reply, but saw you edited first
)
Hehehe, yeah.
Can you please explain how the following lines work?
distFromLeftRight = (width - j < width / 2 ? width - j : j);
distFromTopBottom = (width - i < width / 2 ? width - i : i);
I don't quite understand the syntax contained within the brackets.
Originally posted by: Minjin
Alright...so would the area of that inside 'box' be equal to the area outside of it? In other words, is the area 1/2?
Mark
Originally posted by: hypn0tik
Well the only qualm I have with the program is that you can only consider integer values of x and y of a given point (x,y) on the grid.
Edit: Thanks for the clarification of the code.
Originally posted by: mugs
Originally posted by: hypn0tik
Well the only qualm I have with the program is that you can only consider integer values of x and y of a given point (x,y) on the grid.
Edit: Thanks for the clarification of the code.
Well yeah, it's only meant to give you an approximation of what it would look like... albeit skewed due to the characters being taller than they are wide. It'd look better if I used graphics and did a higher "resolution", but no matter what the resolution there will always be a discrete interval between each "pixel" (in this case each character is a pixel and that interval is 1... or you could look at it as having a height and width of 1 and the interval would be 1/71).
Originally posted by: EKKC
Originally posted by: ronin2kr6
Ironic if someone could have googled the answers before hand
maybe they allow you a laptop or pda to the interview so you can google the answers!!!
Originally posted by: hypn0tik
Originally posted by: mugs
Originally posted by: hypn0tik
Well the only qualm I have with the program is that you can only consider integer values of x and y of a given point (x,y) on the grid.
Edit: Thanks for the clarification of the code.
Well yeah, it's only meant to give you an approximation of what it would look like... albeit skewed due to the characters being taller than they are wide. It'd look better if I used graphics and did a higher "resolution", but no matter what the resolution there will always be a discrete interval between each "pixel" (in this case each character is a pixel and that interval is 1... or you could look at it as having a height and width of 1 and the interval would be 1/71).
What you say is true. However, if you look closely at your 'right' answer, you have the potential to get a circle out of it if you 'fill in the blanks' so to speak.
Originally posted by: mugs
Originally posted by: hypn0tik
Originally posted by: mugs
Originally posted by: hypn0tik
Well the only qualm I have with the program is that you can only consider integer values of x and y of a given point (x,y) on the grid.
Edit: Thanks for the clarification of the code.
Well yeah, it's only meant to give you an approximation of what it would look like... albeit skewed due to the characters being taller than they are wide. It'd look better if I used graphics and did a higher "resolution", but no matter what the resolution there will always be a discrete interval between each "pixel" (in this case each character is a pixel and that interval is 1... or you could look at it as having a height and width of 1 and the interval would be 1/71).
What you say is true. However, if you look closely at your 'right' answer, you have the potential to get a circle out of it if you 'fill in the blanks' so to speak.
Yeah... but if it was a circle it'd look like the example of a circle I made. Remember, we know 4 points (N,S,E,W to use my compass example) are 1/4 from the center, so if it was a circle it'd have to be a circle of radius 1/4. But it doesn't look like the circle of radius 1/4 that I generated.![]()