Skip to content
Gblog 100 Days of Code with GFG – Get Committed to a Challenge!
If you’ve ever tried to learn and master any skill or excel in any of the fields whether it be public speaking, swimming, investing, etc.… Read More
An ObjectOutputStream writes primitive data types and graphs of Java objects to an OutputStream. The objects can be read (reconstituted) using an ObjectInputStream. Persistent storage… Read More
Abstract class for writing filtered character streams. The abstract class FilterWriter itself provides default methods that pass all requests to the contained stream. Subclasses of… Read More
This a character stream class whose source is a string. Constructor: StringReader(String s) : Creates a new string reader. Methods : void close() : Closes… Read More
Sqrt (or Square Root) Decomposition Technique is one of the most common query optimization technique used by competitive programmers. This technique helps us to reduce… Read More
scanf() : The C library function int scanf (const char *format, …) reads formatted input from stdin. Syntax: int scanf(const char *format, ...) Return type:… Read More
This abstract class for writing to character streams. The only methods that a subclass must implement are write(char[], int, int), flush(), and close(). Most subclasses,… Read More
It is an abstract class for reading character streams. The only methods that a subclass must implement are read(char[], int, int) and close(). Most subclasses,… Read More
Consider the below C++ program. Is it right way of returning array from a function?  C #include <stdio.h>   int* fun() {     int arr[100];  … Read More
Recently I attended interview at Amazon for SDE 1 profile. Round 1 (Written): 3 questions were given and I was asked to write the executable… Read More
Given an integer array, the task is to divide the array into the maximum number of sub-arrays such that the averages of all subarrays are… Read More
Given two arrays, the task is that we find numbers which are present in first array, but not present in the second array. Examples :   Input… Read More
Round 1: Online coding round There is dedicated Samsung software for coding test the question is given below: There is one spaceship. X and Y… Read More
Given an array arr[] of size ‘n’ and a positive integer k. Consider series of natural numbers and remove arr[0], arr[1], arr[2], …, arr[p] from… Read More
Python supports various looping techniques by certain inbuilt functions, in various sequential containers. These methods are primarily very useful in competitive programming and also in… Read More
Given the array representation of Complete Binary Tree i.e, if index i is the parent, index 2*i + 1 is the left child and index… Read More