remove starter code templates for all questions in CodeChallenge component

This commit is contained in:
ishikabhoyar
2025-11-03 19:53:45 +05:30
parent 356d532beb
commit 0c844c3122

View File

@@ -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 <stdio.h>
#include <stdlib.h>
#include <stdbool.h>
// ${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 <iostream>
#include <vector>
using namespace std;
// ${problem.title} solution
int main() {
// Write your solution here
return 0;
}`
'C': ``,
'Python': ``,
'Java': ``,
'C++': ``
};
return templates[lang] || problem.starterCode;