0% found this document useful (0 votes)
14 views13 pages

L1_intro

The document outlines an elective course focused on efficient coding for problem solving and competitive programming, aimed at preparing students for written tests and interviews. It emphasizes developing a strong understanding of data structures and algorithms, along with practical problem-solving skills through real-life applications. The course will utilize online platforms and resources while progressing through various coding challenges and strategies to enhance efficiency.

Uploaded by

mikocon493
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
14 views13 pages

L1_intro

The document outlines an elective course focused on efficient coding for problem solving and competitive programming, aimed at preparing students for written tests and interviews. It emphasizes developing a strong understanding of data structures and algorithms, along with practical problem-solving skills through real-life applications. The course will utilize online platforms and resources while progressing through various coding challenges and strategies to enhance efficiency.

Uploaded by

mikocon493
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 13

Efficient Coding for

Problem Solving and


Competitive Programming
Why This Elective
› Helping good students to start preparing for on/off
campus written tests & interviews
› Assuming that a student has not done anything beyond
studying Institute’s DS & Algo subjects
› Learn problem solving skills needed usually in tests &
interviews
› Understand the basics of online submissions and related
issues.
› Systematically start Competitive Programming
› Interact, Practice and learn

1/22/2025 2
Focus of the subject:
› Pre-requisites: Passion of programming, strong
programming fundamentals, good knowledge of DS &
Algo
› Now: Develop better comprehension of DS and Algo
concepts, learn commonly used tricks & techniques
needed
› Analogy: 10+2 Math syllabus is same for CBSE, JEE
Mains & JEE –Advanced, but skills needed are different
for mains and advanced

1/22/2025 3
How the syllabi designed for this subject?
› Through your seniors in Google, Microsoft, Amazon,
CodeNation etc
› Special Thanks to Shivam Jindal, Google USA, Kunal
Khanna, Google USA, Pulkit Garg, Amazon and many
others
› Its just a beginning, we will learn and grow together

1/22/2025 4
What you will learn
› Overview of Efficient Coding for Problem Solving and
CP
› Use of Number Theory for problem-solving
› Coding for Optimizing time and Space using Sequential
Storage
› Applying Non-Linear Data Structures for real-life
problems
› CP Problem Solving using Advanced Topics

1/22/2025 5
How will we progress
› Focus will be problem solving beyond standard
operations/problems covered already in DS & Algo
› Problem Solving means concepts of DS & Algo
knowledge to be applied for problems given in
statements belonging to real-life situations
› We will start with array, searching/sorting simple data
str based straight problems (no real life situations
initially), commonly asked in interviews etc
› Here focus will be to improve the efficiency (time/space
requirements)
› Next will be efficient coding for problems related to
linked list, priority queues, trees, graphs, some new data
structures
1/22/2025 6
How will we progress
› Use of STL & CP platforms will be initiated after few
days
› Issues of constraints & their solutions
› Algorithmic strategies and real-life problem based
coding
› Outcome: step towards preparation of internship tests &
interviews; better awareness to progress in CP & ACM-
ICPC etc
› First attempt in this direction, Let us try our level best to
achieve our goal.

1/22/2025 7
Example problem of online CP platforms
Problem description
Write a program that multiplies pairs of integers.

Input description
Input starts with one line containing an integer , where
, denoting the number of test cases. Then lines
follow, each containing a test case. Each test case consists of
two integers , where , separated by a
single space.

Output description
For each test case, output one line containing the value of

1/22/2025 INTRODUCTION TO COMPETITIVE PROGRAMMING 8


Example problem
Sample input Sample output
4 12
34 0
13 0 8
18 10000
100 100

1/22/2025 INTRODUCTION TO COMPETITIVE PROGRAMMING 9


Correctness?
› The solutions are incorrect!
› If , the output is 0.
– Correct solution is .
› 32-bit integer is too small, overflow will occur.
– Can switch to 64-bit integer mode. (Architecture dependant)
› Remedy:
– long long int

1/22/2025 INTRODUCTION TO COMPETITIVE PROGRAMMING 10


Books & References
› Karumanchi: Data Structures and Algorithms Made
Easy, CareerMonk Publications, 2017
› G L McDowell: Cracking the Coding Interviews,
CareerCup Publications, 2016
› Nakariakov: Cracking Programming Interviews: 500
Questions with Solutions
› geekforgeeks.org
› codechef.com, spoj.com, codeforces.com,
interviewbit.com
› Adnan Aziz: Elements of Programming Interviews

1/22/2025 INTRODUCTION TO COMPETITIVE PROGRAMMING 11


How to start online problem Solving?
› What is Competitive Programming?
– Wikipedia
– GeeksforGeeks:
– How to begin: https://www.geeksforgeeks.org/how-to-begin-
with-competitive-programming/
› Different Programming Contents
– Google Code Jam
– Facebook Hacker Cup
– ACM - ICPC

1/22/2025 INTRODUCTION TO COMPETITIVE PROGRAMMING 12


Online Platforms
› Useful sites:
– gooksforgeeks.org
– interviewbit.com
› Online Programming Contents Platforms
– Codechef.com
– Coderforces.com
– Hackerrank.com
– Topcoder.com
– SPOJ.com

1/22/2025 INTRODUCTION TO COMPETITIVE PROGRAMMING 13

You might also like