Presentation is loading. Please wait.

Presentation is loading. Please wait.

Курс лекций для подготовки к олимпиадам по программированию Решение задач на время, или Cracking the Coding Interview Глухих Михаил Игоревич, к.т.н., доц.

Similar presentations


Presentation on theme: "Курс лекций для подготовки к олимпиадам по программированию Решение задач на время, или Cracking the Coding Interview Глухих Михаил Игоревич, к.т.н., доц."— Presentation transcript:

1 Курс лекций для подготовки к олимпиадам по программированию Решение задач на время, или Cracking the Coding Interview Глухих Михаил Игоревич, к.т.н., доц. mailto: glukhikh@mail.ru

2 Cracking the Coding Interview  It’s a book!  Gayle Laakmann  Downloadable Основы программирования на языках C и C++ 2

3 General principles  Stages Resume collection Phone screening On-site interview Homework  Questions Behavioral Technical Основы программирования на языках C и C++ 3

4 Must have  Structures: vectors, linked lists, trees, stacks, queues, hash tables  Algorithms: BFS, DFS, binary search, merge & quick sort, simple tree operations  Concepts: bit manipulation, singleton & factory patterns, memory types (stack, static, heap), recursion, big O  Language & library details: inheritance, polymorphism, multithreading, etc. Основы программирования на языках C и C++ 4

5 Some interviews from personal experience…  JetBrains Mostly questions about “what does this code” and “how good is it” Homework  Which language is it? What’s the longest common substring?  Intel Specific questions about finite automata and SystemC General C++ & OOP questions  Facebook / Microsoft Основы программирования на языках C и C++ 5

6 General rules  Some decision is better than no decision Do it first  Good decision is better than some decision Remember about time and memory consumption Основы программирования на языках C и C++ 6

7 Algorithms approaches  Examplify Angle between hour & minute hands  Pattern matching Find the minimum in a rotated sorted list like this: 5 8 10 14 1 3 4  Simplify & generalize Is it possible to make a given ransom note from given newspaper words?  Base case & build (induction) Print all permutations of a string  Data structure brainstorm Keep track of a median in an extending list Основы программирования на языках C и C++ 7

8 Additional task #1  Are two strings anagrams? Основы программирования на языках C и C++ 8

9 Additional task #2  Design a stack that can push, pop, and get minimum  Limitation: all three operations should work in O(1) time Основы программирования на языках C и C++ 9

10 Additional task #3  Find the first common ancestor of two given nodes in a binary tree Основы программирования на языках C и C++ 10


Download ppt "Курс лекций для подготовки к олимпиадам по программированию Решение задач на время, или Cracking the Coding Interview Глухих Михаил Игоревич, к.т.н., доц."

Similar presentations


Ads by Google