"Problem of the Day"
Solve this question to get points.
Find the number of occurrences of a given search word in a 2d-Array of characters where the word can go up, down, left, right and around 90 degree bends.
Full Problem: https://practice.geeksforgeeks.org/problems/count-occurences-of-a-given-word-in-a-2-d-array/1
Solve this question to get points.
Find the number of occurrences of a given search word in a 2d-Array of characters where the word can go up, down, left, right and around 90 degree bends.
Full Problem: https://practice.geeksforgeeks.org/problems/count-occurences-of-a-given-word-in-a-2-d-array/1
practice.geeksforgeeks.org
Count occurrences of a given word in a 2-d array | Practice | GeeksforGeeks
Find the number of occurrences of a given search word in a 2d-Array of characters where the word can go up, down, left, right, and around 90-degree bends.
Note: While making a word you can use one cell only once.
Example 1:
Input:
R
Note: While making a word you can use one cell only once.
Example 1:
Input:
R
"Problem of the Day"
Solve this question to get points.
Given a matrix of size n*m. Every cell of matrix contains either 'A' or 'B'. Exchange is defined as swaping the characters between two cells.
Full Problem: https://bit.ly/3UeDYdp
Solve this question to get points.
Given a matrix of size n*m. Every cell of matrix contains either 'A' or 'B'. Exchange is defined as swaping the characters between two cells.
Full Problem: https://bit.ly/3UeDYdp
practice.geeksforgeeks.org
Minimum Exchange | Practice | GeeksforGeeks
Given a matrix of size n*m. Every cell of matrix contains either 'A' or 'B'. Exchange is defined as swaping the characters between two cells. Your task is to find the minimum number of exchange needed to rearrange the given matrix suc
Your programming journey starts with diving into programming languages.
Stay tuned in to get you started with your programming journey in a more structured way.
We'll begin with the Introduction to Programming Languages and share all the study material with the important article links on the specific date mentioned.
Let's cover the languages that are most important as follows:
C - 13th Sept
C++ - 14th Sept
Java - 15th Sept
Python - 16th Sept
PHP - 17th Sept
P.S. Save the dates.
Stay tuned in to get you started with your programming journey in a more structured way.
We'll begin with the Introduction to Programming Languages and share all the study material with the important article links on the specific date mentioned.
Let's cover the languages that are most important as follows:
C - 13th Sept
C++ - 14th Sept
Java - 15th Sept
Python - 16th Sept
PHP - 17th Sept
P.S. Save the dates.
β€12π₯4π3
"Problem of the Day"
Solve this question to get points.
Given a Binary Search Tree. Convert a given BST into a Special Max Heap with the condition that all the values in the left subtree of a node should be less than all the values in the right subtree of the node.
Full Problem: https://bit.ly/3QISK8V
Solve this question to get points.
Given a Binary Search Tree. Convert a given BST into a Special Max Heap with the condition that all the values in the left subtree of a node should be less than all the values in the right subtree of the node.
Full Problem: https://bit.ly/3QISK8V
practice.geeksforgeeks.org
BST to max heap | Practice | GeeksforGeeks
Given a Binary Search Tree. Convert a given BST into a Special Max Heap with the condition that all the values in the left subtree of a node should be less than all the values in the right subtree of the node. This condition is applied on all th
π1
C Programming Langauge: Part 1
Introduction:
C is a procedural programming language with features like:
- low-level access to memory,
- simple set of keywords, and
- clean style.
Many later languages have borrowed syntax/features directly or indirectly from the C language. Like syntax of Java, PHP, JavaScript, and many other languages are mainly based on the C language. C++ is nearly a superset of C language.
Variables and Data Types:
Variables:
Basically, a variable is used to store some form of data while keywords are reserved words whose meaning is already known to the compiler. Find more about variables here: https://bit.ly/3qzvz6A
Data Types: The data type is a collection of data with values having fixed values, meaning as well as its characteristics. Each variable in C has an associated data type.
To get into more details about different types of data types, check this: https://bit.ly/3qyyKLH
Go from basics to advance in just a click: https://bit.ly/3U97WPF
Introduction:
C is a procedural programming language with features like:
- low-level access to memory,
- simple set of keywords, and
- clean style.
Many later languages have borrowed syntax/features directly or indirectly from the C language. Like syntax of Java, PHP, JavaScript, and many other languages are mainly based on the C language. C++ is nearly a superset of C language.
Variables and Data Types:
Variables:
Basically, a variable is used to store some form of data while keywords are reserved words whose meaning is already known to the compiler. Find more about variables here: https://bit.ly/3qzvz6A
Data Types: The data type is a collection of data with values having fixed values, meaning as well as its characteristics. Each variable in C has an associated data type.
To get into more details about different types of data types, check this: https://bit.ly/3qyyKLH
Go from basics to advance in just a click: https://bit.ly/3U97WPF
π4
Introduction to C Programming Language: Part 2
Basic Input and Output in C:
C language has standard libraries that allow input and output in a program. The stdio.h or standard input output library in C has methods for input and output.
Learn about:
- How to take the input and output of basic types in C?
- How to take input and output of advanced type in C?
Check this out to learn more: https://bit.ly/3S3prPL
Operators:
The functionality of the C language is incomplete without the use of operators. Operators allow us to perform different kinds of operations on operands.
Read more about the operators & their different types here: https://bit.ly/3L6uT21
Loops:
In programming, sometimes there is a need to perform some operation more than once or (say) n number of times. Loops come into use when we need to repeatedly execute a block of statements.
Here you can find all you need to know about Loop: https://bit.ly/3Dkap3T
Go from basics to advanced in C in just a click: https://bit.ly/3U97WPF
Basic Input and Output in C:
C language has standard libraries that allow input and output in a program. The stdio.h or standard input output library in C has methods for input and output.
Learn about:
- How to take the input and output of basic types in C?
- How to take input and output of advanced type in C?
Check this out to learn more: https://bit.ly/3S3prPL
Operators:
The functionality of the C language is incomplete without the use of operators. Operators allow us to perform different kinds of operations on operands.
Read more about the operators & their different types here: https://bit.ly/3L6uT21
Loops:
In programming, sometimes there is a need to perform some operation more than once or (say) n number of times. Loops come into use when we need to repeatedly execute a block of statements.
Here you can find all you need to know about Loop: https://bit.ly/3Dkap3T
Go from basics to advanced in C in just a click: https://bit.ly/3U97WPF
β€1π1π1
Introduction to C Programming Language: Part 3
Arrays: Arrays is simply a collection of similar data items stored at contiguous memory locations and elements can be accessed randomly using indices of an array. Here, you will be learning about arrays declaration by specifying the size, Array declaration by initializing elements, Array declaration by specifying the size and initializing elements, advantages & disadvantages of arrays.
Know more in detail about Arrays in C: https://bit.ly/3RE9I9Z
Pointers: Pointers store address of variables or a memory location. To use pointers in C, you must understand operators. Also, thereβs much more to learn in pointers like Pointers and Multidimensional Arrays, Array Name as Pointers, Pointer Expressions, and Pointer Arithmetic.
Check here to read more: https://bit.ly/3d9QKJj
Go from basics to advanced in C in just a click: https://bit.ly/3U97WPF
Arrays: Arrays is simply a collection of similar data items stored at contiguous memory locations and elements can be accessed randomly using indices of an array. Here, you will be learning about arrays declaration by specifying the size, Array declaration by initializing elements, Array declaration by specifying the size and initializing elements, advantages & disadvantages of arrays.
Know more in detail about Arrays in C: https://bit.ly/3RE9I9Z
Pointers: Pointers store address of variables or a memory location. To use pointers in C, you must understand operators. Also, thereβs much more to learn in pointers like Pointers and Multidimensional Arrays, Array Name as Pointers, Pointer Expressions, and Pointer Arithmetic.
Check here to read more: https://bit.ly/3d9QKJj
Go from basics to advanced in C in just a click: https://bit.ly/3U97WPF
π3
Introduction to the C Programming Languages: Part 4
Arrays: Arrays are simply a collection of similar data items stored at contiguous memory locations and elements can be accessed randomly using indices of an array. Here, you will be learning about arrays declaration by specifying the size, initializing elements, specifying the size and initializing elements, advantages & disadvantages of arrays.
Know more in detail about Arrays in C: https://bit.ly/3RE9I9Z
Pointers: Pointers store the address of variables or a memory location. To use pointers in C, you must understand operators. Also, thereβs much more to learn in pointers like Pointers and Multidimensional Arrays, Array Name as Pointers, Pointer Expressions, and Pointer Arithmetic.
Check here to read more: https://bit.ly/3d9QKJj
Go from basics to advanced in C in just a click: https://bit.ly/3U97WPF
Arrays: Arrays are simply a collection of similar data items stored at contiguous memory locations and elements can be accessed randomly using indices of an array. Here, you will be learning about arrays declaration by specifying the size, initializing elements, specifying the size and initializing elements, advantages & disadvantages of arrays.
Know more in detail about Arrays in C: https://bit.ly/3RE9I9Z
Pointers: Pointers store the address of variables or a memory location. To use pointers in C, you must understand operators. Also, thereβs much more to learn in pointers like Pointers and Multidimensional Arrays, Array Name as Pointers, Pointer Expressions, and Pointer Arithmetic.
Check here to read more: https://bit.ly/3d9QKJj
Go from basics to advanced in C in just a click: https://bit.ly/3U97WPF
π2
Introduction to C Programming: Part 5
String in C: String in C programming is a sequence of characters terminated with a null character β\0β.
Also, declaring a string is as simple as declaring a one-dimensional array. Know how to initialize the string in C, how to read a string from the user, how to read a line of Text in C, and a lot more. Check this to know more: https://bit.ly/3BCQNGM
Multidimensional array in C: A multi-dimensional array can be termed as an array of arrays that stores homogeneous data in tabular form. Data in multidimensional arrays are stored in row-major order. To take a deeper dive into the multidimensional arrays, i.e. 2-d & 3-d arrays, click here: https://bit.ly/3d8hlXf
Find some interesting facts in C Programming: https://bit.ly/3xiiBh6
Thereβs still much more left to learn about C such as implementing what youβve learned using projects, & must-do interview questions.
Go from basics to advanced in C in just a click: https://bit.ly/3U97WPF
String in C: String in C programming is a sequence of characters terminated with a null character β\0β.
Also, declaring a string is as simple as declaring a one-dimensional array. Know how to initialize the string in C, how to read a string from the user, how to read a line of Text in C, and a lot more. Check this to know more: https://bit.ly/3BCQNGM
Multidimensional array in C: A multi-dimensional array can be termed as an array of arrays that stores homogeneous data in tabular form. Data in multidimensional arrays are stored in row-major order. To take a deeper dive into the multidimensional arrays, i.e. 2-d & 3-d arrays, click here: https://bit.ly/3d8hlXf
Find some interesting facts in C Programming: https://bit.ly/3xiiBh6
Thereβs still much more left to learn about C such as implementing what youβve learned using projects, & must-do interview questions.
Go from basics to advanced in C in just a click: https://bit.ly/3U97WPF
π3π1
"Problem of the Day"
Solve this question to get points.
Given is an array A[] of size N. Return the number of non-empty subsequences such that the product of all numbers in the subsequence is Power of 2.
Full Problem: https://bit.ly/3Bgovk2
Solve this question to get points.
Given is an array A[] of size N. Return the number of non-empty subsequences such that the product of all numbers in the subsequence is Power of 2.
Full Problem: https://bit.ly/3Bgovk2
practice.geeksforgeeks.org
Power Of 2 and Subsequences | Practice | GeeksforGeeks
Given is an array A[] of size N. Return the number of non-empty subsequences such that the product of all numbers in the subsequence is Power of 2. Since the answer may be too large, return it modulo 109 + 7.
Example 1:
Input:
N = 3
A[] = {
Example 1:
Input:
N = 3
A[] = {
π1
C++ Programming Language: Part 1
C++ is a general-purpose programming language and is widely used nowadays for competitive programming. It has imperative, object-oriented, and generic programming features. C++ runs on lots of platforms like Windows, Linux, Unix, Mac, etc.
Setting up C++ Development Environment: Before you start programming with C++. You will need an environment to be set up on our local computer to compile and run our C++ programs successfully.
To set up an Ide and more details: https://bit.ly/3DtzqcO
C Vs C++: C can be differentiated from C++ on the basis of many factors.
Factor 1: C program that wonβt compile in C++:
Although C++ is designed to have backward compatibility with C, there can be many C programs that would produce compiler errors when compiled with a C++ compiler.
To understand in detail: https://bit.ly/3dgmYCB
You can find a lot more topics in detail here: https://bit.ly/3qER1XT
C++ is a general-purpose programming language and is widely used nowadays for competitive programming. It has imperative, object-oriented, and generic programming features. C++ runs on lots of platforms like Windows, Linux, Unix, Mac, etc.
Setting up C++ Development Environment: Before you start programming with C++. You will need an environment to be set up on our local computer to compile and run our C++ programs successfully.
To set up an Ide and more details: https://bit.ly/3DtzqcO
C Vs C++: C can be differentiated from C++ on the basis of many factors.
Factor 1: C program that wonβt compile in C++:
Although C++ is designed to have backward compatibility with C, there can be many C programs that would produce compiler errors when compiled with a C++ compiler.
To understand in detail: https://bit.ly/3dgmYCB
You can find a lot more topics in detail here: https://bit.ly/3qER1XT
π3
C++ Programming: Part 2
Object-oriented programming aims to implement real-world entities like inheritance, hiding, polymorphism, etc in programming.
Inheritance: Inheritance is the capability of a class to derive properties and characteristics from another class.
Learn about why & when to use inheritance, modes, and its types here; https://bit.ly/3eD7vNi
Polymorphism: Polymorphism, basically means something exhibits different forms in different situations.
To know more in detail: https://bit.ly/3djVJHg
Encapsulation: In C++ encapsulation can be implemented using Class and access modifiers. Take a deep dive into the Encapsulation & the Role of access specifiers in encapsulation here: https://bit.ly/3eNPw79
Object-Oriented Design: The OOP concept was basically designed to overcome the drawback of the above programming methodologies, which were not so close to real-world applications. To delve into this: https://bit.ly/3RYCt0M
Learn more concepts in C++ here: https://bit.ly/3qER1XT
Object-oriented programming aims to implement real-world entities like inheritance, hiding, polymorphism, etc in programming.
Inheritance: Inheritance is the capability of a class to derive properties and characteristics from another class.
Learn about why & when to use inheritance, modes, and its types here; https://bit.ly/3eD7vNi
Polymorphism: Polymorphism, basically means something exhibits different forms in different situations.
To know more in detail: https://bit.ly/3djVJHg
Encapsulation: In C++ encapsulation can be implemented using Class and access modifiers. Take a deep dive into the Encapsulation & the Role of access specifiers in encapsulation here: https://bit.ly/3eNPw79
Object-Oriented Design: The OOP concept was basically designed to overcome the drawback of the above programming methodologies, which were not so close to real-world applications. To delve into this: https://bit.ly/3RYCt0M
Learn more concepts in C++ here: https://bit.ly/3qER1XT
π1
Introduction to C++ Programming Language: Part 3
Function Overloading: Function overloading is when two or more functions can have the same name but different parameters. When a function name is overloaded with different jobs it is called Function Overloading. Learn how Function Overloading work and more here: https://bit.ly/3BDsRDd
Operator Overloading: In C++, we can make operators work for user-defined classes. This means C++ has the ability to provide the operators with a special meaning for a data type, this ability is known as operator overloading.
To understand this concept with example in detail: https://bit.ly/3xhUzD9
Exception handling: One of the advantages of C++ over C is Exception Handling. Exceptions are runtime anomalies or abnormal conditions that a program encounters during its execution.
Learn more about why exception handling over traditional error handling here: https://bit.ly/3LeCtaF
Find more C++ concepts in detail: https://bit.ly/3qER1XT
Function Overloading: Function overloading is when two or more functions can have the same name but different parameters. When a function name is overloaded with different jobs it is called Function Overloading. Learn how Function Overloading work and more here: https://bit.ly/3BDsRDd
Operator Overloading: In C++, we can make operators work for user-defined classes. This means C++ has the ability to provide the operators with a special meaning for a data type, this ability is known as operator overloading.
To understand this concept with example in detail: https://bit.ly/3xhUzD9
Exception handling: One of the advantages of C++ over C is Exception Handling. Exceptions are runtime anomalies or abnormal conditions that a program encounters during its execution.
Learn more about why exception handling over traditional error handling here: https://bit.ly/3LeCtaF
Find more C++ concepts in detail: https://bit.ly/3qER1XT
π2
Introduction to C++ Programming Language: Part 4
C++ STL: STL is a set of C++ template classes to provide common programming data structures and functions such as lists, stacks, arrays, etc.STL has 4 components: Algorithms, Containers, Functions, & Iterators. Read more in detail: https://bit.ly/3S5bhOa
Multimap in C++: Multimap is similar to a map with the addition that multiple elements can have the same keys. One important thing to note about multimap is that multimap keeps all the keys in sorted order always. Learn about the basic functions associated with Multimap, and its implementation here: https://bit.ly/3dagfds
C++ Library: Thereβs a lot to learn in C++ Library such as Sqrt, sqrtl, and sqrtf in C++, rename function in C/C++, Floating point manipulation, and a lot more. You can find some inbuilt library functions for user input here: https://bit.ly/3qCmjOY
Learn more C++ concepts here: https://bit.ly/3qER1XT
C++ STL: STL is a set of C++ template classes to provide common programming data structures and functions such as lists, stacks, arrays, etc.STL has 4 components: Algorithms, Containers, Functions, & Iterators. Read more in detail: https://bit.ly/3S5bhOa
Multimap in C++: Multimap is similar to a map with the addition that multiple elements can have the same keys. One important thing to note about multimap is that multimap keeps all the keys in sorted order always. Learn about the basic functions associated with Multimap, and its implementation here: https://bit.ly/3dagfds
C++ Library: Thereβs a lot to learn in C++ Library such as Sqrt, sqrtl, and sqrtf in C++, rename function in C/C++, Floating point manipulation, and a lot more. You can find some inbuilt library functions for user input here: https://bit.ly/3qCmjOY
Learn more C++ concepts here: https://bit.ly/3qER1XT
β€4π3
Introduction to the C++ Programming Language: Part 5
C++ Advanced: Advanced C++ with Boost library is intended to be widely useful, and usable across a broad spectrum of applications. For example, they are helpful for handling large numbers having a range beyond the long long, long double data type (264) in C++. You can find some cool tricks that you can use Big Integer Data Type, and Arbitrary Precision Data Type here: https://bit.ly/3DF0mXx
C++ in Competitive Programming: Competitive Programming enables you to code a given problem under provided constraints. If youβre also a competitor programmer or wanted to get started with it, here are some cool tricks you can begin with: https://bit.ly/3Le3cEu
To take a deeper dive into the C++ concepts: https://bit.ly/3qER1XT
C++ Advanced: Advanced C++ with Boost library is intended to be widely useful, and usable across a broad spectrum of applications. For example, they are helpful for handling large numbers having a range beyond the long long, long double data type (264) in C++. You can find some cool tricks that you can use Big Integer Data Type, and Arbitrary Precision Data Type here: https://bit.ly/3DF0mXx
C++ in Competitive Programming: Competitive Programming enables you to code a given problem under provided constraints. If youβre also a competitor programmer or wanted to get started with it, here are some cool tricks you can begin with: https://bit.ly/3Le3cEu
To take a deeper dive into the C++ concepts: https://bit.ly/3qER1XT
β€1π1
"Problem of the Day"
Solve this question to get points.
You are given an array Arr of size N containing non-negative integers. Your task is to choose the minimum number of elements such that their sum should be greater than the sum of the rest of the elements of the array.
Full Problem: https://bit.ly/3UaIQjo
Solve this question to get points.
You are given an array Arr of size N containing non-negative integers. Your task is to choose the minimum number of elements such that their sum should be greater than the sum of the rest of the elements of the array.
Full Problem: https://bit.ly/3UaIQjo
practice.geeksforgeeks.org
Smallest Subset with Greater Sum | Practice | GeeksforGeeks
You are given an array Arr of size N containing non-negative integers. Your task is to choose the minimum number of elements such that their sum should be greater than the sum of the rest of the elements of the array.
Example 1:
Inp
Example 1:
Inp
Introduction to Java: Part 1
Basics: Java program is a collection of objects, and these objects communicate through method calls to each other to work together. Cover the basic terminologies & Syntax: https://bit.ly/3xpfZOH
Operators in Java: Operators constitute the basic building block of any programming language. Java too provides many types of operators which can be used according to the need to perform various calculations and functions, be it logical, arithmetic, relational, etc. You can find more in detail here: https://bit.ly/3U9QI4J
Strings & Arrays in Java: Java uses strings to make it memory efficient. You can learn more about classes and strings in java and ways of creating a string here: https://bit.ly/3DIaezN
Whereas Arrays in Java work differently than they do in C/C++. Cover the important points about Java arrays and more here: https://bit.ly/3xlOfKD
Find more concepts of Java here: https://bit.ly/3ddCqPW
Basics: Java program is a collection of objects, and these objects communicate through method calls to each other to work together. Cover the basic terminologies & Syntax: https://bit.ly/3xpfZOH
Operators in Java: Operators constitute the basic building block of any programming language. Java too provides many types of operators which can be used according to the need to perform various calculations and functions, be it logical, arithmetic, relational, etc. You can find more in detail here: https://bit.ly/3U9QI4J
Strings & Arrays in Java: Java uses strings to make it memory efficient. You can learn more about classes and strings in java and ways of creating a string here: https://bit.ly/3DIaezN
Whereas Arrays in Java work differently than they do in C/C++. Cover the important points about Java arrays and more here: https://bit.ly/3xlOfKD
Find more concepts of Java here: https://bit.ly/3ddCqPW
π4
Introduction to Java: Part 2
OOPs in Java: The main aim of OOP is to bind together the data and the functions that operate on them. Here you will learn about the different characteristics of an Object-Oriented Programming Language and how they are implemented in Java. Check this to learn in detail: https://bit.ly/3BJUWJn
Wrapper Classes: A wrapper class wraps (encloses) around a data type and gives it an object appearance. Wrapper classes are final and immutable. To learn more about wrapper classes, check this: https://bit.ly/3QMqiTV
Access Modifiers: Access modifiers in Java helps to restrict the scope of a class, constructor, variable, method, or data member. There are 4 types of access modifiers available in Java: Default, Private, Protected, and Public. Learn about these in detail: https://bit.ly/3BhhlfE
Learn more concepts of Java here: https://bit.ly/3ddCqPW
OOPs in Java: The main aim of OOP is to bind together the data and the functions that operate on them. Here you will learn about the different characteristics of an Object-Oriented Programming Language and how they are implemented in Java. Check this to learn in detail: https://bit.ly/3BJUWJn
Wrapper Classes: A wrapper class wraps (encloses) around a data type and gives it an object appearance. Wrapper classes are final and immutable. To learn more about wrapper classes, check this: https://bit.ly/3QMqiTV
Access Modifiers: Access modifiers in Java helps to restrict the scope of a class, constructor, variable, method, or data member. There are 4 types of access modifiers available in Java: Default, Private, Protected, and Public. Learn about these in detail: https://bit.ly/3BhhlfE
Learn more concepts of Java here: https://bit.ly/3ddCqPW
π3π₯1
Introduction to Java: Part 3
Packages: A package in Java is a mechanism to encapsulate a group of classes, sub-packages and interfaces. Learn how packages work, the types of packages, and how to access a class with just a click:https://bit.ly/3S6GoJ6
Constructors in Java: A constructor in Java is a special method used to initialize objects. The constructor is called when an object of a class is created. Know how the constructor is different from methods in Java, and more here: https://bit.ly/3QMcVmG
Multithreading: Multithreading allows concurrent execution of two or more parts of a program for maximum CPU utilization. Each part of such a program is called a thread. To learn more about multithreading in java: https://bit.ly/3djzoK7
Find more concepts of Java to learn here: https://bit.ly/3ddCqPW
Packages: A package in Java is a mechanism to encapsulate a group of classes, sub-packages and interfaces. Learn how packages work, the types of packages, and how to access a class with just a click:https://bit.ly/3S6GoJ6
Constructors in Java: A constructor in Java is a special method used to initialize objects. The constructor is called when an object of a class is created. Know how the constructor is different from methods in Java, and more here: https://bit.ly/3QMcVmG
Multithreading: Multithreading allows concurrent execution of two or more parts of a program for maximum CPU utilization. Each part of such a program is called a thread. To learn more about multithreading in java: https://bit.ly/3djzoK7
Find more concepts of Java to learn here: https://bit.ly/3ddCqPW
π3π₯1