
-

Hackerrank | Plus Minus Problem
Given an array of integers, calculate the ratios of its elements that are positive, negative, and zero. Print the decimal value of each fraction on a new line with places after the decimal. Note: This challenge introduces precision problems. The test cases are scaled to six decimal places, though answers with absolute error of up to 10^-4 are acceptable. Example… Read more
-

Hackerrank Problems | Diagonal Difference
Given a square matrix, calculate the absolute difference between the sums of its diagonals. For example, the square matrix is shown below: The left-to-right diagonal =1+5+9=15. The right to left diagonal = 3+5+9=17. Their absolute difference is |15-17|=2. Function description Complete the diagonalDifference function in the editor below. diagonalDifference takes the following parameter: Return Input Format The first line… Read more
-

Hackerrank Problems | Compare the triplets
Alice and Bob each created one problem for HackerRank. A reviewer rates the two challenges, awarding points on a scale from 1 to 100 for three categories: problem clarity, originality, and difficulty. The rating for Alice’s challenge is the triplet a = (a[0], a[1], a[2]), and the rating for Bob’s challenge is the triplet b = (b[0], b[1], b[2]). The task is to find… Read more
-

Learning Curves | Machine Learning from Scratch
Till now, We have read about Gradient Descent,Min-Batch Gradient Descent,Stochastic Gradient Descent and other type of Gradient Descents and Polynomial Regression. In this post we will learn about Learning Curves in Machine Learning . Introduction Learning curves are graphical representations of how a model’s performance changes over time as it learns from training data. These… Read more
-

Polynomial Regression | Machine Learning from Scratch
Introduction Till now, We have read about Gradient Descent,Min-Batch Gradient Descent,Stochastic Gradient Descent and other type of Gradient Descents. In this post we will learn about Polynomial Regression. What if your data is actually more complex than a simple straight line? Surprisingly,you can actually use a linear model to fit nonlinear data. A simple way… Read more
-

C Program to get Two Sum and Three Sum
When working with arrays, solving problems like finding two elements that sum up to a target or three elements with a specific sum is quite common. In this blog post, we’ll explore simple implementations in C for both the two-sum and three-sum problems using both iterative and recursive methods. Two Sum Problem Iterative Approach The… Read more