π *Big O Notation Cheatsheet* π
Understand how your code performs as data grows!
πΉ *O(1) β Constant Time*
β Time is the same no matter the input size
π Example: Accessing an element in a hash table
π‘ Fastest possible performance
πΉ *O(log n) β Logarithmic Time*
β Performance grows slowly even with large input
π Example: Binary search on a sorted array
π‘ Very efficient for large data sets
πΉ *O(n) β Linear Time*
β Time grows in direct proportion to input
π Example: Looping through an array
π‘ Good for simple iterations
πΉ *O(n log n) β Linearithmic Time*
β Grows faster than linear but better than quadratic
π Example: Efficient sorting like Merge Sort, Quick Sort
π‘ Common in real-world sorting algorithms
πΉ *O(nΒ²) β Quadratic Time*
β Time grows with square of input size
π Example: Bubble sort, selection sort
π‘ Avoid for large inputs
πΉ *O(nΒ³) β Cubic Time*
β Time grows with cube of input size
π Example: Triple nested loops
π‘ Very slow for large n
πΉ *O(2βΏ) β Exponential Time*
β οΈ Time doubles with each input addition
π Example: Recursive Fibonacci
π‘ Impractical for even moderate inputs
πΉ *O(n!) β Factorial Time*
β οΈ Time grows factorially with input
π Example: Solving Traveling Salesman with brute force
π‘ Used in brute-force permutations or combinations
π§ *Tips:*
β Prefer O(1) > O(log n) > O(n) > O(n log n)
β Avoid O(nΒ²), O(2βΏ), O(n!) unless absolutely necessary
β Use the right data structures & algorithms
π¬ *Tap β€οΈ if this helped you!*
Understand how your code performs as data grows!
πΉ *O(1) β Constant Time*
β Time is the same no matter the input size
π Example: Accessing an element in a hash table
π‘ Fastest possible performance
πΉ *O(log n) β Logarithmic Time*
β Performance grows slowly even with large input
π Example: Binary search on a sorted array
π‘ Very efficient for large data sets
πΉ *O(n) β Linear Time*
β Time grows in direct proportion to input
π Example: Looping through an array
π‘ Good for simple iterations
πΉ *O(n log n) β Linearithmic Time*
β Grows faster than linear but better than quadratic
π Example: Efficient sorting like Merge Sort, Quick Sort
π‘ Common in real-world sorting algorithms
πΉ *O(nΒ²) β Quadratic Time*
β Time grows with square of input size
π Example: Bubble sort, selection sort
π‘ Avoid for large inputs
πΉ *O(nΒ³) β Cubic Time*
β Time grows with cube of input size
π Example: Triple nested loops
π‘ Very slow for large n
πΉ *O(2βΏ) β Exponential Time*
β οΈ Time doubles with each input addition
π Example: Recursive Fibonacci
π‘ Impractical for even moderate inputs
πΉ *O(n!) β Factorial Time*
β οΈ Time grows factorially with input
π Example: Solving Traveling Salesman with brute force
π‘ Used in brute-force permutations or combinations
π§ *Tips:*
β Prefer O(1) > O(log n) > O(n) > O(n log n)
β Avoid O(nΒ²), O(2βΏ), O(n!) unless absolutely necessary
β Use the right data structures & algorithms
π¬ *Tap β€οΈ if this helped you!*
β€1
100+ Practice Questions
β C/C++
β Python
β JavaScript
β Java
β C#
β Golang
β Simple Numbers
β Find a digit at a specific place in a number
β Find count of digits in a number
β Find the largest digit
β Find the 2nd largest digit
β Find the kth largest digit
β Find the smallest digit
β Find the 2nd smallest digit
β Find the kth smallest digit
β Find generic root (sum of all digits) of a number
β Reverse the digits in a number
ββ Rotate the digits in a number
ββ Is the number a palindrome?
ββ Find sum of 'n' numbers
ββ Check if a number is perfect square
ββ Find a number in an AP sequence
ββ Find a number in a GP sequence
ββ Find a number in fibonacci sequence
ββ Check number divisibility by 2, 3, 5, 9
ββ Check if a number is primary or not
20. Given a number, print all primes smaller than it
ββ Check if a number is circular prime or not
ββ Find all prime factors of a number
ββ Find the GCD of 2 numbers
ββ Find the LCM of 2 numbers
ββ Find the factorial of a number
ββ Find the exponentiation of a number
β Unit Conversion
β Number Base (Binary, Octal, Hexadecimal, Decimal)
β Weight (gram, kg, pound)
β Height (cm, m, inch, feet)
β Temperature (centigrade, fahrenhite)
β Distance (km, mile)
β Area (mΒ², kmΒ², acre)
β Volume (ltr, gallon)
β Time (sec, min, hour)
β Currency
β Calculator
β Loan EMI Calculator
β Fixed Deposit Returns Calculator
β Interest Calculator
β BMI Calculator
β Item Price (considering tax, discount, shipping)
β Tip Calculator
β Geometry
β Find distance between 2 points
β Given 2 sides of a right angle triangle, find the 3rd
β Find 3rd angle of a triangle when 2 are given
β Area of a triangle when 3 sides are given
β Area of a right angle triangle
β Perimeter of a Square
β Area of a Square
β Perimeter of a Rectangle
β Area of a Rectangle
β Circumference of a Circle
ββ Area of a Circle
ββ Circumference of a Semi-Circle
ββ Area of a Semi-Circle
ββ Area of a Ring
ββ Circumference of an Ellipse
ββ Area of an Ellipse
ββ Suface Area of a Sphere
ββ Volume of a Sphere
ββ Surface Area of a Hemisphere
20. Volume of a Hemisphere
ββ Surface area of a Cube
ββ Volume of a Cube
ββ Surface area of a Cylinder
ββ Volume of a Cylinder
β Vector
β Find Scalar Multiplication of a vector
β Find addition/subtraction of vectors
β Find magnitude of a vector
β Find an unit vector along a given vector
β Find dot product of 2 vectors
β Find cross product of 2 vectors
β Check if 2 vectors are orthogonal
β Matrix
β Find the determinant of a matrix
β Find Scalar Multiplication of a matrix
β Find addition/subtraction of matrices
β Find the transpose of a matrix
β Find if 2 matrices are orthogonal
β Find inverse of a 2x2 and 3x3 matrix
β Set
β Find Union of 2 sets
β Find Intersection of 2 sets
β Find the Difference of 2 sets
β Find the Symmetric Difference of 2 sets
β Find if a set is subset/superset of another set
β Find if 2 sets are disjoints
β Special Numbers
β Strong Number
β Perfect Number
β Armstrong Number
β Harshad Number
β Kaprekar Number
β Lychrel Number
β Narcissistic Decimal Number
β Lucus Number
β Catalan Number
β Duck Number
ββ Ugly Number
ββ Abundant Number
ββ Deficient Number
ββ Automorphic Number
ββ Magic Number
ββ Friendly Pair Numbers
ββ Neon Number
ββ Spy Number
ββ Happy Number
20. Sunny Number
ββ Disarium Number
ββ Pronic Number
ββ Trimorphic Number
ββ Evil Number
ββ Amicable Pairs
β C/C++
β Python
β JavaScript
β Java
β C#
β Golang
β Simple Numbers
β Find a digit at a specific place in a number
β Find count of digits in a number
β Find the largest digit
β Find the 2nd largest digit
β Find the kth largest digit
β Find the smallest digit
β Find the 2nd smallest digit
β Find the kth smallest digit
β Find generic root (sum of all digits) of a number
β Reverse the digits in a number
ββ Rotate the digits in a number
ββ Is the number a palindrome?
ββ Find sum of 'n' numbers
ββ Check if a number is perfect square
ββ Find a number in an AP sequence
ββ Find a number in a GP sequence
ββ Find a number in fibonacci sequence
ββ Check number divisibility by 2, 3, 5, 9
ββ Check if a number is primary or not
20. Given a number, print all primes smaller than it
ββ Check if a number is circular prime or not
ββ Find all prime factors of a number
ββ Find the GCD of 2 numbers
ββ Find the LCM of 2 numbers
ββ Find the factorial of a number
ββ Find the exponentiation of a number
β Unit Conversion
β Number Base (Binary, Octal, Hexadecimal, Decimal)
β Weight (gram, kg, pound)
β Height (cm, m, inch, feet)
β Temperature (centigrade, fahrenhite)
β Distance (km, mile)
β Area (mΒ², kmΒ², acre)
β Volume (ltr, gallon)
β Time (sec, min, hour)
β Currency
β Calculator
β Loan EMI Calculator
β Fixed Deposit Returns Calculator
β Interest Calculator
β BMI Calculator
β Item Price (considering tax, discount, shipping)
β Tip Calculator
β Geometry
β Find distance between 2 points
β Given 2 sides of a right angle triangle, find the 3rd
β Find 3rd angle of a triangle when 2 are given
β Area of a triangle when 3 sides are given
β Area of a right angle triangle
β Perimeter of a Square
β Area of a Square
β Perimeter of a Rectangle
β Area of a Rectangle
β Circumference of a Circle
ββ Area of a Circle
ββ Circumference of a Semi-Circle
ββ Area of a Semi-Circle
ββ Area of a Ring
ββ Circumference of an Ellipse
ββ Area of an Ellipse
ββ Suface Area of a Sphere
ββ Volume of a Sphere
ββ Surface Area of a Hemisphere
20. Volume of a Hemisphere
ββ Surface area of a Cube
ββ Volume of a Cube
ββ Surface area of a Cylinder
ββ Volume of a Cylinder
β Vector
β Find Scalar Multiplication of a vector
β Find addition/subtraction of vectors
β Find magnitude of a vector
β Find an unit vector along a given vector
β Find dot product of 2 vectors
β Find cross product of 2 vectors
β Check if 2 vectors are orthogonal
β Matrix
β Find the determinant of a matrix
β Find Scalar Multiplication of a matrix
β Find addition/subtraction of matrices
β Find the transpose of a matrix
β Find if 2 matrices are orthogonal
β Find inverse of a 2x2 and 3x3 matrix
β Set
β Find Union of 2 sets
β Find Intersection of 2 sets
β Find the Difference of 2 sets
β Find the Symmetric Difference of 2 sets
β Find if a set is subset/superset of another set
β Find if 2 sets are disjoints
β Special Numbers
β Strong Number
β Perfect Number
β Armstrong Number
β Harshad Number
β Kaprekar Number
β Lychrel Number
β Narcissistic Decimal Number
β Lucus Number
β Catalan Number
β Duck Number
ββ Ugly Number
ββ Abundant Number
ββ Deficient Number
ββ Automorphic Number
ββ Magic Number
ββ Friendly Pair Numbers
ββ Neon Number
ββ Spy Number
ββ Happy Number
20. Sunny Number
ββ Disarium Number
ββ Pronic Number
ββ Trimorphic Number
ββ Evil Number
ββ Amicable Pairs
π1
β
*Beginnerβs Roadmap to Learn DSA* π§ π»
1οΈβ£ *Foundations* β Understand programming basics & core math
2οΈβ£ *Data Structures* β Arrays, Linked Lists, Stacks, Queues
3οΈβ£ *Searching & Sorting* β Binary Search, Quick Sort, Merge Sort
4οΈβ£ *Trees & Graphs* β Binary Trees, BFS, DFS, Graph theory
5οΈβ£ *Recursion* β Learn base & recursive cases, backtracking
6οΈβ£ *Advanced Structures* β Heaps, Hash Maps, Tries
7οΈβ£ *Algorithms* β Greedy, Divide & Conquer, DP
8οΈβ£ *Advanced Topics* β String, Bit Manipulation, Sliding Window
9οΈβ£ *Problem Solving* β Daily practice on LeetCode, Codeforces, etc.
π *Projects + GitHub* β Build & share to showcase your DSA skills
π¬ Tap β€οΈ for more!
1οΈβ£ *Foundations* β Understand programming basics & core math
2οΈβ£ *Data Structures* β Arrays, Linked Lists, Stacks, Queues
3οΈβ£ *Searching & Sorting* β Binary Search, Quick Sort, Merge Sort
4οΈβ£ *Trees & Graphs* β Binary Trees, BFS, DFS, Graph theory
5οΈβ£ *Recursion* β Learn base & recursive cases, backtracking
6οΈβ£ *Advanced Structures* β Heaps, Hash Maps, Tries
7οΈβ£ *Algorithms* β Greedy, Divide & Conquer, DP
8οΈβ£ *Advanced Topics* β String, Bit Manipulation, Sliding Window
9οΈβ£ *Problem Solving* β Daily practice on LeetCode, Codeforces, etc.
π *Projects + GitHub* β Build & share to showcase your DSA skills
π¬ Tap β€οΈ for more!
β€1
Google Certification Courses Links:
1. Google Digital Marketing & E-Commerce - https://bit.ly/4cktVvy
2. Google AI Essential Course - https://bit.ly/4en8Thn
3. Google Project Management - https://bit.ly/3VEh6qm
4. Google Data Analytics - https://bit.ly/45oxVJ2
5. Google IT Support - https://bit.ly/3Rpx19k
6. Google Cybersecurity - https://bit.ly/3VC9HYt
7. Google User Experience (UX) Design - https://bit.ly/4ezRAtV
1. Google Digital Marketing & E-Commerce - https://bit.ly/4cktVvy
2. Google AI Essential Course - https://bit.ly/4en8Thn
3. Google Project Management - https://bit.ly/3VEh6qm
4. Google Data Analytics - https://bit.ly/45oxVJ2
5. Google IT Support - https://bit.ly/3Rpx19k
6. Google Cybersecurity - https://bit.ly/3VC9HYt
7. Google User Experience (UX) Design - https://bit.ly/4ezRAtV
Coursera
Google Digital Marketing & E-commerce
Offered by Google. Get on the fast track to a career in ... Enroll for free.
Jobs/Opportunities for you :
1. Prompt Engg
https://www.linkedin.com/jobs/view/4289559807
2. Social Media Intern
https://www.linkedin.com/jobs/view/4288665472
3. Content Writer
https://www.linkedin.com/jobs/view/4264048079
Happy Learning π»
1. Prompt Engg
https://www.linkedin.com/jobs/view/4289559807
2. Social Media Intern
https://www.linkedin.com/jobs/view/4288665472
3. Content Writer
https://www.linkedin.com/jobs/view/4264048079
Happy Learning π»
Linkedin
Zingly.ai hiring Prompt Engineer in Greater Bengaluru Area | LinkedIn
Posted 7:52:04 PM. Help us reinvent conversations between people and brands.At Zingly, weβre not just building anotherβ¦See this and similar jobs on LinkedIn.