Acceptable to use built in functions?

New gg7jc
Nov 16 9 Comments

Studying for future interviews. Current company didnt give me any challenge, just asked about my past experiences and see if i was a cultural fit.

Learning python and wondering if its acceptable to use built in functions (max, isalpha, isnumeric, sort, find, etc) for a leetcode type of challenge?

TC: 50k
YOE: less than 1

comments

Want to comment? LOG IN or SIGN UP
TOP 9 Comments
  • Uber / Eng mH7bSe
    - write a quick sort function
    - sort(...)

    That definitely not OK
    Nov 16 3
    • Wayfair / Eng UqId35
      It's quick to write though
      Nov 16
    • Uber / Eng mH7bSe
      Instant fail though.
      Nov 16
    • Wayfair / Eng UqId35
      Fail fast, that's the secret to success
      Nov 16
  • Microsoft trikkyboi
    If you use it, you should basically understand how you would implement it yourself.

    If you use max on an unsorted array, you would also communicate that functionally all this method does is iterate across the array, and thus is O(n).

    If you use sort, you had better completely understand the complexity, what algorithm is probably being used, how it’s implemented.

    In other words, don’t use built in functions as shortcuts in your learning. Use it as shortcuts in the code you write on a whiteboard, but understand it.
    Nov 16 2
    • New gg7jc
      OP
      Thank you.

      So as someone who is junior, new to python, an effective learning towards leetcode/coderbyre questions, is to not use the built in functions at first but try to write out the loops and the if statements
      Nov 16
    • Microsoft trikkyboi
      Definitely, I’d say that’s a good practice to follow as you get started!
      Nov 16
  • New /\
    Yes mostly, but to be sur3 you need to communicate that with the interviewer. And expect them to possibly ask you to implement those.
    Nov 16 0
  • Criteo jnGg16
    Yes
    Nov 16 0

Salary
Comparison

    Real time salary information from verified employees