Skip to content

Instantly share code, notes, and snippets.

View sejalyadav0818's full-sized avatar
:octocat:
Focusing

SEJAL YADAV sejalyadav0818

:octocat:
Focusing
View GitHub Profile
@sejalyadav0818
sejalyadav0818 / 202_Happy_Number.md
Last active December 16, 2024 12:38
Code Testcase Test Result Test Result 202. Happy Number

The Happy Number problem is about determining if a given number will eventually reach 1 by repeatedly replacing it with the sum of the squares of its digits. If the number reaches 1, it is called a happy number. Otherwise, if the process falls into a loop that does not include 1, the number is not happy.


Steps of the Problem

  1. Start with a positive integer n.
  2. Replace n with the sum of the squares of its digits.
    • For example: If n = 19, compute ( 1^2 + 9^2 = 1 + 81 = 82 ).
  3. Repeat the process:
  • For ( n = 82 ): ( 8^2 + 2^2 = 64 + 4 = 68 ).
  1. Algorithm

    • Definition: A step-by-step set of instructions to solve a problem.
    • Example: A recipe for baking a cake is like an algorithm—it tells you what to do in sequence.
  2. API (Application Programming Interface)

    • Definition: A way for different software systems to communicate.
    • Example: When you use Google Maps in a food delivery app, the app uses Google Maps' API to show directions.
  3. Cloud Computing

HTTP Methods in RESTful APIs (Elaborated)

RESTful APIs rely on standard HTTP methods to perform operations on resources. Here's an in-depth look:

  1. GET (Retrieve Data)
    • Purpose: Fetch data from the server.
    • Characteristics:
      • Safe: It doesn't modify any data on the server.
      • Idempotent: Multiple identical requests return the same result.
  • Example:
  1. What is the WhatsApp Business API?
    The WhatsApp Business API allows businesses to integrate WhatsApp messaging into their systems for customer communication and support.

  2. What is the difference between WhatsApp Business App and WhatsApp Business API?
    The app is for small businesses, offering manual management, while the API is for larger businesses, enabling automation and integration with CRM or other systems.

  3. What are the key use cases of the WhatsApp Business API?
    Customer support, order notifications, appointment reminders, promotional messages, and two-way communication.

  4. How does template messaging work in the WhatsApp Business API?

mnemonic for each HTTP status code to make them easy to remember:


2xx: Success

  • 200 OK: "✅ OK, all good!"
    • Mnemonic: "Think of this as the happy path—everything works!"
  • 201 Created: "🎉 Created!"
  • Mnemonic: "When something new is born, it’s a celebration."
@sejalyadav0818
sejalyadav0818 / vs_code_settings.md
Last active December 3, 2024 12:40
setting.json

{ "files.autoSave": "onFocusChange", // Save files on focus change "workbench.iconTheme": "eq-material-theme-icons", "workbench.colorTheme": "Tomorrow Night Blue", "terminal.integrated.env.windows": {}, "workbench.settings.applyToAllProfiles": [], "editor.fontFamily": "'Source Code Pro', 'Consolas', 'Courier New', monospace", "editor.fontSize": 14, "editor.fontLigatures": true, "editor.tokenColorCustomizations": {