GeeksforGeeks
17.4K subscribers
1.83K photos
34 videos
24 files
2.76K links
Official Hub ✅

Your coding haven – where tech meets simplicity.

Discover:
😂 Coding Laughter
📘 Curated Study Material
💎 Exclusive Offers

Utilize every service we provide and make a promise to find better opportunities for yourself! #gfgkarlohojayega!
Download Telegram
This media is not supported in your browser
VIEW IN TELEGRAM
Must Learn!💡

While it must be an immense pleasure for you to fulfill your dream of becoming a developer, it is surely confusing to choose between FrontEnd or BackEnd.

So, which one should you choose?

This article will help you in making the best decision with a detailed description of both options. Give it a read.

Link- https://www.geeksforgeeks.org/frontend-vs-backend-which-one-should-i-choose/
👍2
Problem Of The Day
"Max Sum without Adjacents"

Solve the problem to win points

Given an array Arr of size N containing positive integers. Find the maximum sum of a subsequence such that no two numbers in the sequence should be adjacent in the array.

Example 1:
Input:
N = 6
Arr[] = {5, 5, 10, 100, 10, 5}
Output: 110
Explanation: If you take indices 0, 3
and 5, then Arr[0]+Arr[3]+Arr[5] =
5+100+5 = 110.

Example 2:
Input:
N = 4
Arr[] = {3, 2, 7, 10}
Output: 13
Explanation: 3 and 10 forms a non
continuous subsequence with maximum
sum.

Your Task:
You don't need to read input or print anything. Your task is to complete the function findMaxSum() which takes the array of integers arr and n as parameters and returns an integer denoting the answer. It is guaranteed that your answer will always fit in the 32-bit integer.

Expected Time Complexity: O(N)
Expected Auxiliary Space: O(1)

Solve and submit your answer here : https://practice.geeksforgeeks.org/problems/7a33c749a79327b2889d420dd80342fff33aac6d/1

Powered by hirist.com
👍2
This media is not supported in your browser
VIEW IN TELEGRAM
Must Learn! 💡

Among the most issues that we face include 'Time Management', which is a life skill. It is an art to master in this field.

So, why do most of us fail to manage our time?

It's because we lack the right tactics and ways to manage our time. This article discusses the best 5 ways to improve your time management skills.

Give it a read- https://www.geeksforgeeks.org/ways-to-improve-time-management-skills/
Problem Of The Day
"Intersection Point in Y Shaped Linked Lists"

Solve the problem to win points

Given two singly linked lists of size N and M, write a program to get the point where two linked lists intersect each other.

Example 1:
Input:
LinkList1 = 3->6->9->common
LinkList2 = 10->common
common = 15->30->NULL
Output: 15
Explanation:
Y ShapedLinked List

Example 2:
Input:
Linked List 1 = 4->1->common
Linked List 2 = 5->6->1->common
common = 8->4->5->NULL
Output: 8
Explanation:

4 5
| |
1 6
\ /
8 ----- 1
|
4
|
5
|
NULL
Your Task:
You don't need to read input or print anything. The task is to complete the function intersetPoint() which takes the pointer to the head of linklist1(head1) and linklist2(head2) as input parameters and returns data value of a node where two linked lists intersect. If linked list do not merge at any point, then it should return -1.
Challenge : Try to solve the problem without using any extra space.

Expected Time Complexity: O(N+M)
Expected Auxiliary Space: O(1)

Solve and submit your answer here : https://practice.geeksforgeeks.org/problems/eae1fbd0ac8f213a833d231e26ba4d829e79dd9c/1

Powered by hirist.com
👍1
Must Learn!💡

When it comes to programming languages, we have so many options yet we stuck at some point due to confusion.

So, what programming languages are must-haves in 2023?

We have the answer. This article explains and elaborates on the top 10 programming languages that you must learn in 2023.

Give it a read- https://www.geeksforgeeks.org/top-10-programming-languages-to-learn/
👍4
Problem Of The Day
"BST Downward Traversal"

Solve the problem to win points

Given a Binary Search Tree and a target value. You have to find the node whose data is equal to target and return the sum of all descendant node's data which are vertically below the target node. Initially you are at the root node.
Note: If target node is not present in bst then return -1.

Example 1:
Input:
Target = 35
Output: 32
Explanation: Vertically below 35 is 32.

Example 2:
Input:
Target = 25
Output: 52
Explanation: Vertically below 25 is 22, 30 and their sum is 52.

Your Task:
You don't need to read input or print anything. Your task is to complete the function verticallyDownBST() which takes BST(you are given root node of bst ) and target as input, and return an interger value as the sum of vertically down nodes from target. If target is not present in bst then return -1.

Expected Time Complexity: O( n ), n is number of nodes.
Expected Auxiliary Space: O(Height of the tree).

Solve and submit your answer here : https://practice.geeksforgeeks.org/problems/c85e3a573a7de6dfd18398def16d05387852b319/1

Powered by hirist.com
👍1
Must Learn!💡

You maybe unaware of the fact that nobody can analyse your strengths and weaknesses better than you. However, most of us have no idea how to do that.

So, what is the best technique to do so? SWOT Analysis.

A SWOT Analysis assesses your Strengths, Weaknesses, Opportunities, and Threats, giving you clarity for your future decisions.

This article will help you learn to go through all the steps of SWOT Analysis.

Give it a read: https://www.geeksforgeeks.org/personal-swot-analysis-with-examples/?utm_source=geeksforgeeks&utm_medium=newui_home&utm_campaign=articles
👍3
🚨 Job Alert 🚨
Zibtek is hiring for iOS Developer in Bangalore (Kasturinagar).

Experience - 2+ Years
Apply by - Feb 28, 2023

Apply via the following link and share the opportunity with your friends - https://practice.geeksforgeeks.org/jobs/Zibtek-iOS
👍3
Problem Of The Day
"Length of the longest subarray with positive product"

Solve the problem to win points

Given an array arr[] consisting of n integers, find the length of the longest subarray with positive (non zero) product.

Example 1:
Input:
arr[] ={0, 1, -2, -3, -4}
Output:
3
Explanation:
The longest subarray with positive product is:
{1, -2, -3}.Therefore, the required length is 3.

Example 2:
Input:
arr[]={-1, -2, 0, 1, 2}
Output:
2
Explanation:
The longest subarray with positive products
are: {-1, -2}, {1, 2}. Therefore, the required
length is 2.

Your Task: This is a function problem. You don't need to take any input, as it is already accomplished by the driver code. You just need to complete the function maxLength() that takes array arr[], and an integer n as parameters and return the length of the longest subarray where the product of all of its element is positive.

Expected Time Complexity: O(n).
Expected Auxiliary Space: O(1).

Solve and submit your answer here : https://practice.geeksforgeeks.org/problems/4dfa8ba14d4c94f4d7637b6b5246782412f3aeb8/1

Powered by hirist.com
👍2❤1
This media is not supported in your browser
VIEW IN TELEGRAM
Must Learn!💡
ChatGPT by OpenAI has created a buzz around. With its launch, it gained over 1+ million users in just 5 days.

While some people are impressed by its functioning, others are confused and curious to know about the technology used in making chatbot like tool.

Do you also want to make something like this? This will help you in doing so. Give it a read and learn how to build a ChatGPT-like image generator application in android.

Link - https://www.geeksforgeeks.org/how-to-build-a-chatgpt-like-image-generator-application-in-android/?utm_source=geeksforgeeks&utm_medium=newui_home&utm_campaign=articles
Problem Of The Day

"Count number of free cell"

Solve the problem to win points

Given a Matrix size N*N and an integer K. Initially, the matrix contains only 0. You are given K tasks and for each task, you are given two coordinates (r,c) [1 based index]. Where coordinates (r,c) denotes rth row and cth column of the given matrix.

You have to perform each task sequentially in the given order. For each task, You have to put 1 in all rth row cells and all cth columns cells.

After each task, You have to calculate the number of 0 present in the matrix and return it.

Example 1:
Input:
n = 3, k= 3
2 2
2 3
3 2
Output: 4 2 1
Explanation:
After 1st Operation, all the 2nd row
and all the 2nd column will be filled by
1. So remaning cell with value 0 will be 4
After 2nd Operation, all the 2nd row and all
the 3rd column will be filled by 1. So
remaning cell with value 0 will be 2.
After 3rd Operation cells having value 0 will
be 1.

Example 2:
Input:
n = 2, k = 2
1 2
1 1
Output: 1 0

Your Task:
The task is to complete the function countZero(), which takes parameter n, size of
the matrix, k no of operation and array arr[][], which denotes the position of the cells.
You have to return an array that contains all the results.

Expected Time Complexity: O( k ).
Expected Auxiliary Space: O( n+n+k ).

Solve and submit your answer here : https://practice.geeksforgeeks.org/problems/90a81c305b1fe939b9230a67824749ceaa493eab/1

Powered by hirist.com
👍2❤1
Must Learn!💡

Blockchain is talk of the town, since it has entered not just tech space, but finance, supply chain, healthcare, etc.

So, what is a blockchain? How is it helping different sectors?

It is a distributed digital ledger that records transactions across a network of computers.

This article talks about blockchain technology's revolution in different industries. Give it a read - https://www.geeksforgeeks.org/how-blockchain-technology-is-revolutionizing-industries/?utm_source=geeksforgeeks&utm_medium=newui_home&utm_campaign=articles
🚨Job Alert🚨
Pensieve is hiring for Frontend Developer.

Location - Remote (India)
Experience - 1-8 Years
Apply by - Feb 28, 2023

Apply via the following link and share the opportunity with your friends - https://practice.geeksforgeeks.org/jobs/Pensieveid_Frontendev

Visit our jobs portal 'Get Hired With GeeksforGeeks' for more such job opportunities - https://practice.geeksforgeeks.org/jobs
Problem Of The Day

"Maximum Bipartite Matching"

Solve the problem to win points

There are M job applicants and N jobs. Each applicant has a subset of jobs that he/she is interested in. Each job opening can only accept one applicant and a job applicant can be appointed for only one job. Given a matrix G with M rows and N columns where G(i,j) denotes ith applicant is interested in the jth job. Find the maximum number of applicants who can get the job.

Example 1:
Input:
M = 3, N = 5
G = {{1,1,0,1,1},{0,1,0,0,1},
{1,1,0,1,1}}
Output: 3
Explanation: There is one of the possible
assignment-
First applicant gets the 1st job.
Second applicant gets the 2nd job.
Third applicant gets the 4th job.

Example 2:
Input:
M = 6, N = 2
G = {{1,1},{0,1},{0,1},{0,1},
{0,1},{1,0}}
Output: 2
Explanation: There is one of the possible
assignment-
First applicant gets the 1st job.
Second applicant gets the 2nd job.


Your Task:
You don't need to read to print anything. Your task is to complete the function maximumMatch() which takes matrix G as input parameter and returns the maximum number of applicants who can get the job.

Expected Time Complexity: O(N3).
Expected Auxiliary Space: O(N).

Solve and submit your answer here : https://practice.geeksforgeeks.org/problems/9a88fe7ada1c49c2b3da7a67b43875e4a76aface/1

Powered by hirist.com
👍1
This media is not supported in your browser
VIEW IN TELEGRAM
Must Learn!💡

In recent days Python has gained popularity and has a powerful programming language. It has a lot of features that make it stand apart from other programming languages, like versatility and ease of use versatility and ease of use which is helpful for beginners.

So, how can you maximize your Python Code Performance?

We got your back! This article talks about the tips that will be helpful for you to become a pro in the programming language. Give it a read.

Link - https://www.geeksforgeeks.org/tips-to-maximize-your-python-code-performance/?utm_source=telegram&utm_medium=marketingteam_gfgmain&utm_campaign=Pensieveid_BackenDev&utm_term=pythonperformance
👍2
Problem Of The Day
"Balloon Everywhere"

Solve the problem to win points

Bob is very fond of balloons. Once he visited an amusement park with his mother. The mother told Bob that she would buy him a balloon only if he answer her problem right. She gave Bob a string S [contains only lowercase characters] and asked him to use the characters of string to form as many instances of the word "balloon" as possible. Return the maximum number of instances that can be formed.

Help Bob to solve the problem.

Note: You can use each character in the string at most once.

Example 1:
Input:
S: nlaebolko
Output: 1
Explanation:
Here, the number of occurence of 'b' = 1
of occurence of 'a' = 1
of occurence of 'l' = 2
of occurence of 'o' = 2
of occurence of 'n' = 1
So, we can form 1 "balloon" using the letters.

Example 2:
Input:
S: loonbalxballpoon
Output: 2
Explanation:
Here, the number of occurence of 'b' = 2
of occurence of 'a' = 2
of occurence of 'l' = 4
of occurence of 'o' = 4
of occurence of 'n' = 2
So, we can form 2 "balloon" using the letters.

Your Task:
The task is to complete the function maxInstance() which takes a string as the only input parameter and should return the maximum instances that can be formed of the word "balloon" using the given string.

Expected Time Complexity: O(n), n is size of the given string.
Expected Auxiliary Space: O(26).

Solve and submit your answer here : https://practice.geeksforgeeks.org/problems/45fa306a9116332ece4cecdaedf50f140bd252d4/1

Powered by hirist.com
👍5
Must Learn!💡

Javascript is popularly known as the language used for web development, web applications, game development, etc. However, many find it tough, while it is smooth.

So, what are the fundamentals of using JavaScript?

This article will smoothly explain the most important information you should know about. Give it a read.

Link- https://www.geeksforgeeks.org/top-10-javascript-fundamentals-that-every-developer-should-know/?utm_source=telegram&utm_medium=marketingteam_gfgmain&utm_campaign=javascriptfoundation
👍1
🚨Job Alert🚨
Pensieve is hiring for Backend Developer.

Location - Remote (India)
Experience - 1-8 Years
Apply by - Feb 28, 2023

Apply via the following link and share the opportunity with your friends - https://practice.geeksforgeeks.org/jobs/Pensieveid_BackenDev

Visit our jobs portal 'Get Hired With GeeksforGeeks' for more such job opportunities - https://practice.geeksforgeeks.org/jobs
Problem Of The Day
"Minimum Days"

Solve the problem to win points

Given a string S of length N containing only lowercase alphabets. You are also given a permutation P of length N containing integers from 0 to N-1. In (i+1)'th day you can take the P[i] value of the permutation array and replace S[P[i]] with a '?'.

For example in day 1, we can choose index of permutation array is i=0 and replace S[P[0]] with '?'.
Similarly in day 2, we can choose index of permutation array is i=1. You can replace S[P[1]] with '?'.
Similarly in day 3,we can choose index of permutation array is i=2. You can replace S[P[2]] with '?'.

You have to tell the minimum number of days required, such that after it for all index i (0<=i<N-1), if S[i]!='?', then S[i]!=S[i+1].

Example 1:
Input:
N = 4
S = "aabb"
P[] = {2, 1, 3, 0}
Output: 2
Explanation: In day 1, we replace S[P[0]] with '?'.
After that String S = "aa?b". As we can see S
still has character 'a' at index 0 and 1.
In day 2, we replace S[P[1]] with '?'. After
that String S = "a??b". As we can see the String
has for all index i (0<=i<N-1), if S[i]!='?', then S[i]!=S[i+1].

Example 2:
Input:
N = 4
S = "abca"
P[] = {3, 0, 2, 1}
Output: 0
Explanation: We can see that the initial string
S = "abca" has for all index i (0<=i<N-1), if S[i]!='?', then S[i]!=S[i+1].
Your Task:
You don't need to read input or print anything. Your task is to complete the function getMinimumDays() which takes the string S, array P[] and its size N as input parameters and returns the minimum number of days required such that string satisfies with the condition given earlier.

Expected Time Complexity: O(n).
Expected Auxiliary Space: O(1).

Solve and submit your answer here : https://practice.geeksforgeeks.org/problems/f4d22b1f9d62e8bee0ff84e9fa51dc66eb5005ec/1

Powered by hirist.com
🚨Job Alert🚨
JIT Inspire is hiring for React Developer.

Location - Rajiv Gandhi Square, Indore
Experience - 1-3 Years
Apply by - Feb 28, 2023

Apply via the following link and share the opportunity with your friends - https://practice.geeksforgeeks.org/jobs/JItInspire-REACT?utm_source=discord&utm_medium=marketingteam_gfgmain&utm_campaign=JItInspire-REACT

Visit our jobs portal 'Get Hired With GeeksforGeeks' for more such job opportunities - https://practice.geeksforgeeks.org/jobs
❤1