Basic math required for interviews?

Northrop Grumman / Eng sad-panda
Oct 15 9 Comments

I've had different interviewers going too deep into Mathy parts of CS.

Design your own hash table, was able to breeze thru most parts. Then got stuck at generating a good hash function, avoiding collisions and taking into account the position of each character input. I didn't remember the specific Mathy part of this.

Given a tree that is always complete, I represented the tree as an array and jump to any node on the tree by knowing the number of nodes for each level. I forgot the algebra equation to count these nodes from n to m via levels. It was a strange tree structure.

If a candidate was able to get that far and just didn't remember an implementation detail. Is it acceptable and could just wave your hand to these small things or do you ding them for it? The interviewer wasn't impressed and expected me to know all these Mathy portions. Even when I have the best space and runtime.

I usually wave my hand pass these little things because they don't show how good of a programmer you are. These are Google-able items. What you think?

comments

Want to comment? LOG IN or SIGN UP
TOP 9 Comments
  • Apple Azrael3
    I can accept the hash function part, as you can do a PhD on hash functions alone.
    Not being able to derive a tree mapping is indefensible IMO. Just shows poor interview prep.
    Oct 15 3
    • Northrop Grumman / Eng sad-panda
      OP
      The tree wasn't a normal binary tree.
      Oct 15
    • Apple Azrael3
      The point of the interview was then to see if you can derive from basics, and the question served it’s purpose I’d say.
      Oct 15
    • Northrop Grumman / Eng sad-panda
      OP
      So forgetting this equation caused me to fail?
      https://en.wikipedia.org/wiki/Summation
      Oct 15
  • Wayfair zDkt58
    I think those things matter, especially your hash example.
    Oct 15 2
    • Northrop Grumman / Eng sad-panda
      OP
      But tbh, do you ever implement your own hash function and need to know exactly the math part? Knowing internally how it works is enough.
      Oct 15
    • Wayfair zDkt58
      If i was asked to then I’d expect to know it. Sure I haven’t implemented it in a long time but it’s a very strong assumption to say those sorts of skills are never needed. They show an attention to detail and a general inclination to consider the intricacies of what technology you’re using.
      Oct 15
  • Microsoft techladki
    Hash function is sort of okay as long as you come up with something basic.
    Tree not at all.

    Basically anything that can reasonably be derived in the interview is expected, and anything that requires some specific knowledge is sort of okay.
    Oct 15 1
    • Northrop Grumman / Eng sad-panda
      OP
      The tree wasn't a normal binary tree structure. It was a shared node structure where you have a triangle structure. Hard to explain over text. Not something you would normally see. So coming up with a math equation on the spot is dodgy at best.
      Oct 15

Salary
Comparison

    Real time salary information from verified employees