Practice Real Company Assessment Patterns • Latest 2025–2026 Mock Tests

Programming Exercises

Create a function to perform LOOCV (Leave-One-Out Cross-Validation) on a dataset.

Hard

Problem Statement

Create a function to perform LOOCV (Leave-One-Out Cross-Validation) on a dataset.

Sample Input

Data Frame: 
 x y
1 1 2
2 2 4
3 3 6
4 4 8

Sample Output

Mean Squared Error: 0

Limits

Time: 2s · Memory: 256 MB

Code Editor
00:00
# Predefined structure perform_loocv <- function(df) { # Your logic here } # Call the function
Log in or sign up to run or submit your code.Log inSign up
Input
Data Frame: 
 x y
1 1 2
2 2 4
3 3 6
4 4 8
Expected Output
Mean Squared Error: 0