From 0c844c3122413869e8ce6640e91fd318841b0a35 Mon Sep 17 00:00:00 2001 From: ishikabhoyar Date: Mon, 3 Nov 2025 19:53:45 +0530 Subject: [PATCH] remove starter code templates for all questions in CodeChallenge component --- Frontend/src/components/CodeChallenge.jsx | 69 +++-------------------- 1 file changed, 7 insertions(+), 62 deletions(-) diff --git a/Frontend/src/components/CodeChallenge.jsx b/Frontend/src/components/CodeChallenge.jsx index f57c7e6..68a671e 100644 --- a/Frontend/src/components/CodeChallenge.jsx +++ b/Frontend/src/components/CodeChallenge.jsx @@ -206,15 +206,7 @@ const CodeChallenge = () => { output: "[0,1]" } ], - starterCode: `/** - * @param {number[]} nums - * @param {number} target - * @return {number[]} - */ -var twoSum = function(nums, target) { - // Write your solution here - -};` + starterCode: `` }, "Q.2": { id: "palindrome-number", @@ -231,14 +223,7 @@ var twoSum = function(nums, target) { explanation: "From left to right, it reads -121. From right to left, it reads 121-. Therefore it is not a palindrome." } ], - starterCode: `/** - * @param {number} x - * @return {boolean} - */ -var isPalindrome = function(x) { - // Write your solution here - -};` + starterCode: `` }, "Q.3": { id: "valid-parentheses", @@ -259,14 +244,7 @@ var isPalindrome = function(x) { output: "false" } ], - starterCode: `/** - * @param {string} s - * @return {boolean} - */ -var isValid = function(s) { - // Write your solution here - -};` + starterCode: `` } }; @@ -275,43 +253,10 @@ var isValid = function(s) { // Language-specific starter code templates const templates = { 'JavaScript': problem.starterCode, - 'C': `#include -#include -#include - -// ${problem.title} solution - -int main() { - // Write your solution here - - return 0; -}`, - 'Python': `# ${problem.title} -def solution(): - # Write your solution here - # Use input() for user input in Python - # Example: name = input("Enter your name: ") - pass - -if __name__ == "__main__": - solution()`, - 'Java': `public class Solution { - // ${problem.title} - public static void main(String[] args) { - // Write your solution here - - } -}`, - 'C++': `#include -#include -using namespace std; - -// ${problem.title} solution -int main() { - // Write your solution here - - return 0; -}` + 'C': ``, + 'Python': ``, + 'Java': ``, + 'C++': `` }; return templates[lang] || problem.starterCode;