ilpropheta / noslidesconf17

Material and examples of my NoSlidesConf17 hands-on session

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Competitive Programming for fun and self-improvement

Material and examples of my NoSlidesConf17 hands-on session (Nov 25 2017 - Bologna).

Recommended: first solve the challenges here on HackerRank

I'd love hearing from you! Share your solutions into the Discussions tabs:

Use your favourite programming languages!

Retrospective

Solving a problem is not an end, instead, it's the beginning of several opportunities for self-improvement. How? Thinking more in deep about the problem and the solution(s) you developed, asking yourself questions, looking for patterns, playing with constraints, etc. Asking questions is often more important than developing the solution. Or simply: retrospective.

Some retrospective questions:

  • what if your constraints change (e.g. the input grows a lot)?
  • what if the input has particular properties (e.g. it is sorted)?
  • can you find (and combine) patterns to solve this problem (e.g. fold/reduce)?
  • what if the data types change (e.g. big integers)?
  • what if some constants of the problem turn into variables?

Some retrospective constraints/objectives you can establish on the problem:

  • make your input very big and very tiny
  • remove all for loops / use only standard library functions/constructs
  • don't allocate extra space
  • solve a problem in $YourTargetTimeComplexity time and $YourTargetSpaceComplexity space
  • change paradigm
  • solve the problem in terms of another thing (e.g. queue using two stacks)
  • use only $TheOnlyThingToUse (e.g. functions, objects)
  • disable some operations (e.g. division)

About

Material and examples of my NoSlidesConf17 hands-on session


Languages

Language:C++ 100.0%