Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Solving algorithms: beyond cramming for job interviews

Solving algorithms: beyond cramming for job interviews

Nina Torgunakova

April 01, 2023
Tweet

More Decks by Nina Torgunakova

Other Decks in Programming

Transcript

  1. Solving algorithms:
    beyond cramming for
    job interviews
    1
    @ninoid_

    View full-size slide

  2. Have you ever used this site?
    2
    @ninoid_

    View full-size slide

  3. Or this one?
    3
    @ninoid_

    View full-size slide

  4. Or maybe this one?
    4
    @ninoid_

    View full-size slide

  5. How employers see the solving CS problems:
    6
    @ninoid_

    View full-size slide

  6. 9
    @ninoid_
    Nina Torgunakova
    Frontend Engineer

    View full-size slide

  7. Job interviews
    10
    @ninoid_
    Other benefits

    View full-size slide

  8. Some myths and facts about
    algorithmic problems
    11
    @ninoid_

    View full-size slide

  9. Problems are boring.
    12
    Myth №1:
    @ninoid_

    View full-size slide

  10. 13
    @ninoid_
    Myth № 1: Problems are boring

    View full-size slide

  11. Problems could be fun
    and tricky!
    14
    Fact №1:
    @ninoid_

    View full-size slide

  12. 15
    @ninoid_
    Fact №1: Problems could be fun and tricky

    View full-size slide

  13. Can you presume the probability that
    the last person will get his own sit?
    There are 100 seats and 100 passengers.
    16
    @ninoid_
    Fact №1: Problems could be fun and tricky

    View full-size slide

  14. 0,5
    Either you meet
    or either you
    don't meet
    17
    @ninoid_
    Fact №1: Problems could be fun and tricky

    View full-size slide

  15. 18
    @ninoid_
    Fact №1: Problems could be fun and tricky

    View full-size slide

  16. 19
    What is the minimum amount of cuts
    needed to divide a circle into 3 equal
    slices?
    Answer: 3
    @ninoid_
    Fact №1: Problems could be fun and tricky

    View full-size slide

  17. 20
    But what if we need to divide a circle
    into 99 equal slices?
    You can solve it programmatically in
    2 lines!
    @ninoid_
    Fact №1: Problems could be fun and tricky

    View full-size slide

  18. 21
    @ninoid_
    Fact №1: Problems could be fun and tricky

    View full-size slide

  19. ?
    Can you presume the minimum total cost to
    move three chips into one column?
    22
    @ninoid_
    Fact №1: Problems could be fun and tricky

    View full-size slide

  20. ?
    23
    @ninoid_
    Answer: 1
    Fact №1: Problems could be fun and tricky

    View full-size slide

  21. All problems are complex.
    24
    Myth №2:
    @ninoid_

    View full-size slide

  22. 25
    @ninoid_
    Myth №2: All problems are complex

    View full-size slide

  23. There are many tasks for all
    levels of preparation.
    26
    Fact №2:
    @ninoid_

    View full-size slide

  24. 27
    @ninoid_
    Fact №2: Many tasks for each level of preparation

    View full-size slide

  25. 28
    @ninoid_
    Fact №2: Many tasks for each level of preparation

    View full-size slide

  26. 29
    @ninoid_
    Fact №2: Many tasks for each level of preparation

    View full-size slide

  27. 30
    @ninoid_
    Fact №2: Many tasks for each level of preparation

    View full-size slide

  28. Problems are time-consuming.
    31
    Myth №3:
    @ninoid_

    View full-size slide

  29. When you decide to stay in the office
    for ten minutes to sort out a bug
    32
    @ninoid_
    Myth №3: Problems are time-consuming

    View full-size slide

  30. You can limit your solving time
    to prevent wastes.
    33
    Fact №3:
    @ninoid_

    View full-size slide

  31. How I see myself solving a problem
    for two hours without Google
    34
    @ninoid_
    Fact №3: You can limit your time

    View full-size slide

  32. It is all about the marathon.
    Not the sprint.
    35
    @ninoid_
    Fact №3: You can limit your time

    View full-size slide

  33. Problems are not connected with
    real work and needed only for job
    interviews.
    36
    Myth №4:
    @ninoid_

    View full-size slide

  34. 37
    @ninoid_
    Myth №4: Problems are not connected with real work

    View full-size slide

  35. Solving problems can help you
    not only with tech interviews.
    38
    Fact №4:
    @ninoid_

    View full-size slide

  36. 39
    @ninoid_
    Fact №4: It is useful not only for job interviews

    View full-size slide

  37. What will happen in one year?
    Imagine that from today you
    start to solve algorithmic
    problems wisely.
    40
    @ninoid_
    Fact №4: It is useful not only for job interviews

    View full-size slide

  38. // TODO: DELETE THIS SLIDE
    41
    @ninoid_

    View full-size slide

  39. You will write code faster.
    42
    Result №1:
    @ninoid_

    View full-size slide

  40. 43
    @ninoid_
    What I can write now in 5 minutes:
    Result №1: You will write code faster

    View full-size slide

  41. 44
    @ninoid_
    What I wrote in 5 minutes a year ago:
    Result №1: You will write code faster

    View full-size slide

  42. Fewer bugs in your code.
    45
    Result №2:
    @ninoid_

    View full-size slide

  43. 46
    @ninoid_
    Result №2: Fewer bugs in your code.

    View full-size slide

  44. You will explain your decisions
    better.
    47
    Result №3:
    @ninoid_

    View full-size slide

  45. 48
    @ninoid_
    Use the discussion sections to practice explaining
    Result №3: You will explain your decisions better.

    View full-size slide

  46. You will not be afraid of complex
    work tasks.
    49
    Result №4:
    @ninoid_

    View full-size slide

  47. 50
    Auto-building network maps for data centers
    @ninoid_
    Result №4: You will not be afraid of complex tasks.

    View full-size slide

  48. You will expand your horizons.
    Not only in the programming
    field!
    51
    Result №5:
    @ninoid_

    View full-size slide

  49. 52
    @ninoid_
    Result №5: You will expand your horizons.

    View full-size slide

  50. What about lifehacks?
    53
    @ninoid_

    View full-size slide

  51. Keep track of your energy level
    during the day.
    54
    Tip №1:
    @ninoid_

    View full-size slide

  52. Always consider constraints and
    try to test every action.
    55
    Tip №2:
    @ninoid_

    View full-size slide

  53. 56
    Tip №2: Always consider constraints
    1
    2 3
    4 5
    Task: Traverse the tree
    with N amount of nodes
    What if the amount of nodes
    equals 0?
    Could it be?
    @ninoid_

    View full-size slide

  54. Try to explain your solutions
    and learn from others.
    57
    Tip №3:
    @ninoid_

    View full-size slide

  55. 58
    @ninoid_
    Tip №3: Try to learn from others

    View full-size slide

  56. "Don't compare your chapter
    1 with someone else's
    chapter 20."
    59
    @ninoid_
    Tip №3: Try to learn from others

    View full-size slide

  57. Track your progress.
    60
    Tip №4:
    @ninoid_

    View full-size slide

  58. 61
    Tip №4: Track your progress
    @ninoid_

    View full-size slide

  59. 62
    @ninoid_
    Tip №4: Track your progress

    View full-size slide

  60. 63
    @ninoid_
    Tip №4: Track your progress

    View full-size slide

  61. 1. Leetcode.com.
    2. See you tomorrow!
    64
    @ninoid_
    Consistency is a key!

    View full-size slide

  62. @ninoid_
    ninaTorgunakova
    65
    @ninoid_

    View full-size slide