Live Batches
Masterclasses
Menu
Free Courses
Account
Login / Sign Up
Problem Submissions Solution

Replace pi to 3.14

Difficulty: Easy

Acceptance: 75.00%

Points: 20.00

You are given a string s. Your task is to replace every occurrence of the substring "pi" with "3.14" using recursion only. You are not allowed to use loops or built-in replace functions. Return the modified string after all replacements.

Topics

Companies

Articles

Examples:

N/A

Constraints:
  • 1 = length of s = 105
  • The string contains lowercase English letters only
Companies:
Visa Oracle Flipkart
Topics:
Recursion
Locked Content
Access Restricted: Please Login to access the code editor and test cases.