SlideShare a Scribd company logo
Most common
errors encountered
in programming
By Lakshmi
Sarvani V
Emp id 4472
Department of
Basic Engineering Sciences - I
Wrong
Answer
Wrong answer occurs not only
when your logic is wrong but
also due to wrong choice of
datatype.
Let us understand this with an
example
August Long Challenge: Smallest KMP
Wrong Answer
Correct Answer
Example
Question:
Find the
Pattern
The pattern challenge is back again with more complexity. Can you
solve it??
Input 1:
3
2224 5262 223
Output 1:
5485
Input 2:
11
170 368 472 298 22 139 370 1061 162 1073 491
Output 2:
1095
Wrong
Answer
Correct Code
Run Time
Error
(SIGSEGV)
This is an error caused by an invalid memory
reference or segmentation fault. The most
common causes are accessing an array
element out of bounds or using too much
memory.
When the memory assigned is not enough to
store the input then also we get segmentation
fault
Let us understand this with an example
Greatest String
You are given a string S and an integer Q. You are
allowed to perform at most Q operations on the
string. In one operation, you can change
any vowel to it's next character
(e.g., 'a'->'b', 'e'->'f', 'i'->'j', 'o'->'p', 'u'->'v').
Length of the string
can be up to 100000
Error: Time Limit
and Segmentation
fault
Violating the constraint that
Length of the string can be up
to 100000 leads to
segmentation fault.
In finte loop without break
leads to Time limit exceeded
error
Another Example for Segmentation
fault and wrong answer
Question:
Shreya and Non-
Palindrome (Hacker
Earth)
Correct
Code

More Related Content

DOCX
Assignment 2
PDF
Lo 16
PPTX
Adversarial examples reading comprehension system
PPTX
Neural nets
DOC
Prg 215 all discussions uop course guide uopstudy.com
PDF
Gray white simple modern Thesis Defense Presentation .pdf
PDF
Errors
PDF
Date Processing Attracts Bugs or 77 Defects in Qt 6
Assignment 2
Lo 16
Adversarial examples reading comprehension system
Neural nets
Prg 215 all discussions uop course guide uopstudy.com
Gray white simple modern Thesis Defense Presentation .pdf
Errors
Date Processing Attracts Bugs or 77 Defects in Qt 6

Similar to Errors incompetitiveprogramming (20)

PPT
Exception handling.41
PDF
Common Software Failures
PDF
Common Software Failures
PDF
Classes and Errors.pdf
PPTX
Error correction-and-type-of-error-in-c
PDF
PVS-Studio: analyzing ReactOS's code
PPTX
Programming Error or Bug.pptx
PDF
java programm for beginners (basic) level
PDF
Logical Expressions in C/C++. Mistakes Made by Professionals
PDF
(1.4) Identifying and Correcting Errors - PDF.pdf
PPTX
Case Study of the Unexplained
PDF
Plc2 2015 first time right coding
PDF
Mathematicians: Trust, but Verify
PPT
CPP10 - Debugging
PPTX
PVS-Studio team experience: checking various open source projects, or mistake...
PPTX
TYPES OF ERRORS.pptx
PPTX
Error Questions Code Arena made by me ifisbfaobgoaudbog
PPT
Code Analysis-run time error prediction
PPTX
PVS-Studio and static code analysis technique
PDF
Headache from using mathematical software
Exception handling.41
Common Software Failures
Common Software Failures
Classes and Errors.pdf
Error correction-and-type-of-error-in-c
PVS-Studio: analyzing ReactOS's code
Programming Error or Bug.pptx
java programm for beginners (basic) level
Logical Expressions in C/C++. Mistakes Made by Professionals
(1.4) Identifying and Correcting Errors - PDF.pdf
Case Study of the Unexplained
Plc2 2015 first time right coding
Mathematicians: Trust, but Verify
CPP10 - Debugging
PVS-Studio team experience: checking various open source projects, or mistake...
TYPES OF ERRORS.pptx
Error Questions Code Arena made by me ifisbfaobgoaudbog
Code Analysis-run time error prediction
PVS-Studio and static code analysis technique
Headache from using mathematical software
Ad

More from Lakshmi Sarvani Videla (20)

DOCX
Data Science Using Python
DOCX
Programs on multithreading
PPT
Menu Driven programs in Java
DOCX
Recursion in C
DOCX
Simple questions on structures concept
DOCX
Relational Operators in C
PPTX
Recursive functions in C
PPTX
Function Pointer in C
PPTX
DOCX
Java sessionnotes
DOCX
Singlelinked list
PPTX
Functions in python3
PPTX
DOCX
DataStructures notes
DOCX
Solutionsfor co2 C Programs for data structures
DOCX
Data Science Using Python
Programs on multithreading
Menu Driven programs in Java
Recursion in C
Simple questions on structures concept
Relational Operators in C
Recursive functions in C
Function Pointer in C
Java sessionnotes
Singlelinked list
Functions in python3
DataStructures notes
Solutionsfor co2 C Programs for data structures
Ad

Recently uploaded (20)

PDF
Unlocking AI with Model Context Protocol (MCP)
DOCX
The AUB Centre for AI in Media Proposal.docx
PDF
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
PDF
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
PDF
Advanced methodologies resolving dimensionality complications for autism neur...
PPTX
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
PDF
KodekX | Application Modernization Development
PDF
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
PDF
Reach Out and Touch Someone: Haptics and Empathic Computing
PDF
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
PDF
Machine learning based COVID-19 study performance prediction
PPTX
Digital-Transformation-Roadmap-for-Companies.pptx
PDF
Review of recent advances in non-invasive hemoglobin estimation
PDF
Network Security Unit 5.pdf for BCA BBA.
PDF
Agricultural_Statistics_at_a_Glance_2022_0.pdf
PPTX
ACSFv1EN-58255 AWS Academy Cloud Security Foundations.pptx
PPTX
Spectroscopy.pptx food analysis technology
PDF
cuic standard and advanced reporting.pdf
PDF
Dropbox Q2 2025 Financial Results & Investor Presentation
PPTX
Programs and apps: productivity, graphics, security and other tools
Unlocking AI with Model Context Protocol (MCP)
The AUB Centre for AI in Media Proposal.docx
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
Advanced methodologies resolving dimensionality complications for autism neur...
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
KodekX | Application Modernization Development
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
Reach Out and Touch Someone: Haptics and Empathic Computing
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
Machine learning based COVID-19 study performance prediction
Digital-Transformation-Roadmap-for-Companies.pptx
Review of recent advances in non-invasive hemoglobin estimation
Network Security Unit 5.pdf for BCA BBA.
Agricultural_Statistics_at_a_Glance_2022_0.pdf
ACSFv1EN-58255 AWS Academy Cloud Security Foundations.pptx
Spectroscopy.pptx food analysis technology
cuic standard and advanced reporting.pdf
Dropbox Q2 2025 Financial Results & Investor Presentation
Programs and apps: productivity, graphics, security and other tools

Errors incompetitiveprogramming

  • 1. Most common errors encountered in programming By Lakshmi Sarvani V Emp id 4472 Department of Basic Engineering Sciences - I
  • 2. Wrong Answer Wrong answer occurs not only when your logic is wrong but also due to wrong choice of datatype. Let us understand this with an example
  • 3. August Long Challenge: Smallest KMP
  • 6. Example Question: Find the Pattern The pattern challenge is back again with more complexity. Can you solve it?? Input 1: 3 2224 5262 223 Output 1: 5485 Input 2: 11 170 368 472 298 22 139 370 1061 162 1073 491 Output 2: 1095
  • 9. Run Time Error (SIGSEGV) This is an error caused by an invalid memory reference or segmentation fault. The most common causes are accessing an array element out of bounds or using too much memory. When the memory assigned is not enough to store the input then also we get segmentation fault Let us understand this with an example
  • 10. Greatest String You are given a string S and an integer Q. You are allowed to perform at most Q operations on the string. In one operation, you can change any vowel to it's next character (e.g., 'a'->'b', 'e'->'f', 'i'->'j', 'o'->'p', 'u'->'v'). Length of the string can be up to 100000
  • 11. Error: Time Limit and Segmentation fault Violating the constraint that Length of the string can be up to 100000 leads to segmentation fault. In finte loop without break leads to Time limit exceeded error
  • 12. Another Example for Segmentation fault and wrong answer Question: Shreya and Non- Palindrome (Hacker Earth)