## How does free() know the size of memory to be deallocated?

Consider the following prototype of free() function which is used to free memory allocated using malloc() or calloc() or realloc(). filter_none edit close play_arrow link… Read More »

- Write an Article
- Courses @ GeeksforGeeks
- Internships @ GeeksforGeeks
- Coding Practice
- How to write an Interview Experience?
- Must Do Coding Questions Company-wise
- Must Do Coding Questions Topic-wise
- Basic
- Easy
- Medium
- Hard
- Expert
- Step by Step Preparation
- Company Preparation
- Top Topics
- Company Specific Practice
- Software Design Patterns
- Placements Preparation Course
- Interview Corner
- Recent Interview Experiences
- GQ Home Page
- Quiz Corner
- LMNs
- What's New ?
- Leaderboard !!
- Topic-wise Practice
- Subjective Problems
- Difficulty Level - School
- Difficulty Level - Basic
- Difficulty Level - Easy
- Difficulty Level - Medium
- Difficulty Level - Hard
- Explore More...
- C
- C++
- Java
- Python
- SQL
- PHP
- JavaScript
- School Programming
- Operating Systems
- DBMS
- Computer Networks
- Engineering Mathematics
- Design Patterns
- Common Interview Puzzles
- Web Technology
- G-Facts
- Computer Graphics
- Image Processing
- Project Ideas

Consider the following prototype of free() function which is used to free memory allocated using malloc() or calloc() or realloc(). filter_none edit close play_arrow link… Read More »

Spaghetti stack A spaghetti stack is an N-ary tree data structure in which child nodes have pointers to the parent nodes (but not vice-versa) Spaghetti… Read More »

Given an unsorted array arr[] and two numbers x and y, find the minimum distance between x and y in arr[]. The array might also… Read More »

What is the time complexity of following function fun()? Assume that log(x) returns log value in base 2. filter_none edit close play_arrow link brightness_4 code… Read More »

Space Complexity: The term Space Complexity is misused for Auxiliary Space at many places. Following are the correct definitions of Auxiliary Space and Space Complexity.… Read More »

LCS Problem Statement: Given two sequences, find the length of longest subsequence present in both of them. A subsequence is a sequence that appears in… Read More »

We have discussed Overlapping Subproblems and Optimal Substructure properties in Set 1 and Set 2 respectively. We also discussed one example problem in Set 3.… Read More »

Given two arrays: arr1[0..m-1] and arr2[0..n-1]. Find whether arr2[] is a subset of arr1[] or not. Both the arrays are not in sorted order. It… Read More »

Input: A array arr[] of two elements having value 0 and 1 Output: Make both elements 0. Specifications: Following are the specifications to follow. 1)… Read More »

The Longest Increasing Subsequence (LIS) problem is to find the length of the longest subsequence of a given sequence such that all elements of the… Read More »