×
Home Discussions Write at Opengenus IQ
×
  • DSA Cheatsheet
  • HOME
  • Track your progress
  • Deep Learning (FREE)
  • Join our Internship 🎓
  • RANDOM
  • One Liner
Bharat Arya

Bharat Arya

Computer Science Student at University of Petroleum and Energy Studies, Dehradun and Intern at OpenGenus

Dehradun, India •
9 posts •
Algorithms

Split N into maximum composite numbers

Given a number N, the problem is to count the maximum number of composite numbers that sum up to N. We solve this using a greedy algorithm in constant time

Bharat Arya Bharat Arya
Algorithms

Maximize the sum of array[i]*i

Given an array of N integer, we have to maximize the sum of arr[i] * i. Brute force approach will take O(N*N!) time while greedy algorithm will take O(N log N) time

Bharat Arya Bharat Arya
Algorithms

The smallest subset with sum greater than sum of all other elements

In this article, we explored a greedy algorithm to find the smallest subset with sum greater than sum of all other elements in O(N log N) time complexity

Bharat Arya Bharat Arya
Algorithms

Find Minimum sum of product of two arrays

In this article, we explored a greedy algorithm to find the minimum sum of product of two arrays in O(N log N) time whereas the brute force approach takes O(N!^2) time

Bharat Arya Bharat Arya
Algorithms

Find the Largest Cube formed by deleting minimum number of digits from a number

In this article, we find the Largest Cube formed by deleting minimum number of digits from a number using a greedy algorithm which takes O(N^(1/3)log(N)log(N)) time

Bharat Arya Bharat Arya
Software Engineering

Understanding and working with Memset in C

memset is a memory utility in C which is used to set a particular value to a range of memory locations in an efficient way. On going through this article, you will understand How to use memset? and Why performance of memset is better than a simple implementation?

Bharat Arya Bharat Arya
Software Engineering

Working with Typedef in C

typedef is a keyword in C programming language,which stands for type definition. How to use typedef? Why and when to use typedef? Difference between typedef and define

Bharat Arya Bharat Arya
Software Engineering

boolean (bool or _Bool) datatype in C

C programming language (from C99) supports Boolean data type (bool) and internally, it was referred as `_Bool` as boolean was not a datatype in early versions of C. In C, boolean is known as bool data type. To use boolean, a header file stdbool.h must be included to use bool in C.

Bharat Arya Bharat Arya
Software Engineering

Working with character (char) in C

C uses char type to store characters and letters. However, the char type is integer type because underneath C stores integer numbers instead of characters. Characters supported by a computing system depends on the encoding supported by the system.

Bharat Arya Bharat Arya
OpenGenus IQ © 2025 All rights reserved â„¢
Contact - Email: team@opengenus.org
Primary Address: JR Shinjuku Miraina Tower, Tokyo, Shinjuku 160-0022, JP
Office #2: Commercial Complex D4, Delhi, Delhi 110017, IN
Top Posts LinkedIn Twitter
Android App
Apply for Internship