Competitive Coding

🎓 Course Logistics

  • Instructor: Mr Smaranjit Ghose
  • Semester: 4
  • Term: Fall 2023
  • Batches (under direct tutelage): 4A9, 4A17
  • Office Hours 🕜^:

🪜 Pre-requisites:

  • 6 months of programming experience (preferrably Python)
  • High School mathematics

Coursework

📚 Schedule

Course Schedule

Fundamentals of Python

Sl No Problem Solution(s)

Arrays / Lists

Sl No Problem Solution(s)
1 Concatenation of Array
2 Running Sum of a 1D Array
3 Build Array from Permutation
4 Find the Highest Altitude
5 Richest Customer Wealth
6 Shuffle the Array
7 Kids With the Greatest Number of Candies
8 Find Numbers with Even Number of Digits
9 Transpose Matrix
10 Matrix Diagonal Sum
11 Flipping an Image

Linear Search and Binary Search

Sl No Problem Solution(s)
1 Ceiling of a Number in a Sorted Array
2 Floor of a Number in a Sorted Array
3 Find Smallest Letter Greater Than Target
4 First Bad Version
5 Find First and Last Position of Element in Sorted Array
6 Search Insert Position
7 Fair Candy Swap
8 Check if N and it's Double Exists
9 Intersection of Two Arrays
10 Intersection of Two Arrays II
11 Special Array With X Elements Greater Than or Equal X
12 Count Negative Numbers in a Sorted Matrix
13 Peak Index in a Mountain Array
14 Binary Search
15 Valid Perfect Square
16 Arranging Coins
17 Two Sum II - Input Array is Sorted
18 Find Smallest Letter Greater Than Target
19 Guess Number Higher or Lower
20 Sqrt(x)
21 Kth Missing Positive Number

Strings

Sl No Problem Solution(s)
1 Defanging an IP Address
2 Shuffle String
3 Goal Parser Interpretation
4 Count Items Matching a Rule
5 Sorting the Sentence
6 Check If Two String Arrays are Equivalent
7 To Lower Case
8 Determine if String Halves are alike
9 Decrypt String from Alphabet to Integer Mapping
10 Number of Strings that Appear as Substrings in word
11 Robot Return to Origin
12 Reverse Words in a String III
13 Excel Sheet Column Title
14 Long Pressed Name
15 Find the Index of the First Occurrence in a String
16 Valid Palindrome
17 Valid Palindrome II
18 Longest Common Prefix
19 Maximum Repeating String
20 Check if Binary String has at most one segment of ones
21 Merge Strings Alternatively
22 Reverse Prefix of Word
23 Valid Parentheses
24 Length of the Last Word

Patterns

Sl No Problem Solution(s)

LinkedLists

Sl No Problem Solution(s)
1 Convert Binary Number in a Linked List to Integer
2 Reverse Linked List
3 Middle of the Linked List
4 Merge Two Sorted Lists
5 Delete Node in a Linked List
6 Palindrome Linked List
7 Intersection of Two Linked Lists
8 Linked List Cycle
9 Remove Duplicates from Sorted List
10 Find All Numbers Disappeared in an Array
11 Remove Linked List Elements
12 Design Twitter
13 Design Linked List
14 Reverse Linked List II
15 Reorder List
16 Remove Nth Node From End of List
17 Swapping Nodes in a Linked List
18 Add Two Numbers
19 Add Two Numbers II
20 Linked List Cycle II
21 Flatten a Multilevel Doubly Linked List
22 Rotate List
23 Copy List with Random Pointer
24 LRU Cache
25 Remove Duplicates from Sorted List II
26 Design Browser History
27 Partition list
28 Find first node of loop in a linked list
29 Swap Nodes in Pairs
30 Remove Zero Sum Consecutive Nodes from Linked List

Stacks and Queues

Sl No Problem Solution(s)
1 Next Greater Element I
2 Valid Parantheses
3 Min Stack
4 Remove Outermost Parentheses
5 Number of Recent Calls
6 Reverse First K elements of Queue
7 Delete Middle Element of a Stack
8 Inorder Traversal(Iterative)
9 Preorder Traversal(Iterative)
10 Flood Fill
11 Implement Queue using Stacks

Trees

Heaps

Hashing

📢 Course Announcements

Check here for the latest announcements