Skip to content

mohan-aditya05/competitive_programming

Repository files navigation

competitive_programming

Description of various files:

  • linkedlist.cpp- Contains code to simple linked list.

  • mid__ll.cpp - Contains code to find the mid of a singly linked list.

  • array_prob1.cpp- Find maximum value of Sum( i*arr[i]) with only rotations on given array allowed.

  • array_prob2.cpp- Find the Rotation Count in Rotated Sorted array.

  • array_prob3.cpp- Rearrange array such that arr[i] >= arr[j] if i is even and arr[i]<=arr[j] if i is odd and j < i

  • array_prob4.cpp- Rearrange an array in order – smallest, largest, 2nd smallest, 2nd largest, ..

  • array_prob5.cpp- Count all distinct pairs with difference equal to k.

  • array_prob6.cpp- Trapping Rainwater problem

  • array_prob8.cpp- Leaders-in-an-array

Vector Problems

  • vector_basics.cpp - Contains code to basics of vectors in C++
  • vector_prob1.cpp- Maximum Of K- size subarrays (Deque).

Map Problems

Deque Problems

  • deque.cpp- Maximum-of-all-subarrays-of-size-k