Skip to content

Latest commit

 

History

History
180 lines (135 loc) · 9.91 KB

ChallengeGroups.md

File metadata and controls

180 lines (135 loc) · 9.91 KB

Problems groups

This section contains subset of challenges that are grouped by type of solution (recursive, double pointer etc.) or type of problem (searching, sorting etc.). One challenge may fit int outfile groups.

Recursion

List of problems that can be solved using recursion.

Recursion with helper function

Recurrent helper function is useful when we want to solve problem in recursive way, but we don't want to change client API by changing method signature of the original method eg. we don't want to add new parameters (additional data required for recursive call) or change return type (eg. change List<Int> to MutableList<Int>).

Double pointer

Problem solved by using double variable pointing to various indexes of the list. We use double pointer instead of nested loops which decreases complexity from O(n^2) to O(n).

Frequency counter

Problems solved by counting occurrence of element. We use frequency counter instead of nested loops which decreases complexity from O(n^2) to O(n).

Sliding window

We use sliding window instead of nested loops which decreases complexity from O(n^2) to O(n).

List

Search algorithms

Sort algorithms

Other list challenges

Singly Linked List

Doubly Linked List

Binary tree

Integer

String

Matrix

Range

Queue

Stack

Heap

Tree