LearnYard - Free Programming & DSA Blogs | Read, Code, Excel
  • C++ Course
  • DSA Course
  • Online Assessment DSA Questions
  • DSA for Frontend Interview
  • Frontend Interview Experience
  • Low Level Design
  • High Level Design
  • Java Course
  • About
  • Feedback
Sign in Subscribe

sufiyan iqbal

Find All K-Distant Indices in an Array Solution In C++/Java/Python/JS

Problem Description You are given a 0-indexed integer array nums and two integers key and k. An index i in the array is said to be k-distant if there exists at least one index j such that: * |i - j| <= k, and * nums[j] == key In simple terms, a
24 Jul 2025 7 min read
Two Pointer

Apply Operations to an Array Solution In C++/Java/Python/JS

Problem Description You are given a 0-indexed array nums of size n that contains non-negative integers. The goal is to apply a sequence of operations to this array and return the final result after all transformations are complete. For each index i from 0 to n - 2, you need
24 Jul 2025 7 min read

Call by Value, Call by Pointer, and Call by Reference

Understanding how function parameters are passed in C++ is fundamental to mastering the language. Before diving into the types of parameter passing, it's essential to understand what it means to pass a parameter to a function. What is Parameter Passing? When a function is called in C++, you
05 Jul 2025 3 min read

Functions in C++

In C++, functions are the building blocks of reusable and modular code. Whether you're calculating the sum of numbers or managing a large application, functions help keep your code organized and maintainable. Let’s dive into the key concepts that define how functions work in C++. Defining a
05 Jul 2025 5 min read
Page 1 of 1
LearnYard - Free Programming & DSA Blogs | Read, Code, Excel © 2026
Powered by Ghost