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
🚨Job Alert🚨
Aakash Educational Services is hiring for Senior Software Engineer.

Location - Gurgaon / Noida( Hybrid)
Experience - 4+ Years
Apply by - Mar 31, 2023

Apply via the following link and share the opportunity with your friends- https://practice.geeksforgeeks.org/jobs/AkashByjus_srse?utm_source=telegram&utm_medium=marketingteam_gfgmain&utm_campaign=AkashByjus_srse
❀1
Problem Of The Day
"Remainder on dividing by 11"

Solve the problem to win points

Given a big positive number x represented as string, find value of x % 11 or x mod 11. Output is expected as an integer.

Example 1:
Input: x = 1345
Output: 3
Explanation: 1345 % 11 = 3

Example 2:
Input: x = 231456786543567898765
Output: 1
Explanation: 231456786543567898765 % 11 = 1

Your Task:
You don't need to read input or print anything. Your task is to complete the function xmod11() which takes string x as the input parameter and returns the integer value of x%11.

Expected Time Complexity: O(length of string x)
Expected Space Complexity: O(1)

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

Powered by hirist.com
❀1πŸ‘1
Media is too big
VIEW IN TELEGRAM
Summer Skillup Sessions are here!!!πŸ™Œ
Till 8th April...

The FREE workshop will cover the following topics-

1- System Design
2- Full Stack Development
3- Basic to Advanced Level DSA
4- Data Science & ML
5- Competitive Programming
6- GATE CS
7- Android App Development
8- Backend Development

You have the flexibility to attend one or attend all. Learn from your favorite mentors.πŸ•Ί

Register here - http://bit.ly/3KoysSl
πŸ‘5
Must Learn!πŸ’‘
Finding an internship in the middle of the 2nd or 3rd year is quite a tiring task…more so when you’ve limited resources and knowledge about the outer corporate world.

Being a 2nd-year student, you should focus on getting your basics right. You must get yourself familiar with Data Structures and Algorithms.

Further, this article will explain the top internships in detail, applying process, and the importance of each one. Give itg a read.

Link- https://www.geeksforgeeks.org/top-off-campus-internships-for-2nd-year-college-students-google-microsoft-amazon/
πŸ‘4πŸ’―2
Problem Of The Day
"Minimum Steps Required"

Solve the problem to win points

Given a string str consisting of only two characters 'a' and 'b'. You need to find the minimum steps required to make the string empty by removing consecutive a's and b's.

Example 1:
Input:
str = "bbaaabb"
Output:
2
Explanation:
Operation 1: Removal of all a's modifies str to "bbbb".
Operation 2: Removal of all remaining b's makes str
empty.
Therefore, the minimum number of operations required
is 2.

Example 2:
Input:
str = "aababaa"
Output:
3
Explanation:
Operation 1: Removal of b's modifies str to "aaabaa".
Operation 2: Removal of b's modifies str = "aaaaa".
Operation 3: Removal of all remaining a's makes str
empty.
Therefore, the minimum number of operations required
is 3.

Your Task:
You need to complete the function minSteps() which takes a string str as the only input parameter and returns an integer, denoting the minimum steps required to make the string empty.

Expected Time Complexity: O(N), where N = length of string str
Expected Space Complexity: O(1)

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

Powered by hirist.com
πŸ‘3
Media is too big
VIEW IN TELEGRAM
Everyone is going crazy. Because.....
GeeksforGeeks Summer Carnival is going live tonight!🀩🎊
Till 9th April...πŸ•Ί

Save upto 25% on all courses βœ…
Additional Cashback βœ…
Free GFG Goodies βœ…

So, get ready to party-cipate!πŸ™Œ

Link- https://practice.geeksforgeeks.org/courses?utm_source=telegram&utm_medium=marketingteam_gfgmain&utm_campaign=gsc2023
πŸ”₯1
Your wait is over!!!!🎊
GeeksforGeeks Summer Carnival is live now...πŸ•Ί

Go, get your hands on the best offers.🀩

Participate now - https://practice.geeksforgeeks.org/courses?utm_source=telegram&utm_medium=marketingteam_gfgmain&utm_campaign=gsc2023
❀1πŸ‘1πŸ”₯1
Problem Of The Day
"Count Special Numbers"

Solve the problem to win points

You are given an array arr[ ] of size N consisting of only positive integers. Your task is to find the count of special numbers in the array. A number is said to be a special number if it is divisible by at least 1 other element of the array.

Example 1:
Input:
N = 3
arr[] = {2, 3, 6}
Output:
1
Explanation:
The number 6 is the only special number in the
array as it is divisible by the array elements 2
and 3. Hence, the answer is 1 in this case.

Example 2:
Input:
N = 4
arr[] = {5, 5, 5, 5}
Output:
4
Explanation:
All the array elements are special. Hence,
the answer is 4 in this case.

Your Task:
You don't need to read input or print anything. Complete the function countSpecialNumbers() which takes the integer N and the array arr[ ] as the input parameters, and returns the count of special numbers in the array.


Expected Time Complexity: O(N*M) where M = max(arr[i])
Expected Auxiliary Space: O(N)

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

Powered by hirist.com
πŸ‘1
Media is too big
VIEW IN TELEGRAM
The BIGGEST CARNIVAL of the season is hereπŸ₯³

πŸ‘‰ Grab your favourite courses at the lowest prices,
πŸ‘‰ Get free GfG goodies,
πŸ‘‰ Participate in hiring challenges, and so much more!! 😍🎊

....till 9th April

Participate Now- https://practice.geeksforgeeks.org/courses?utm_source=telegram&utm_medium=marketingteam_gfgmain&utm_campaign=gsc2023
❀1πŸ”₯1πŸ‘1
Must Learn!πŸ’‘
Spring Boot is built on top of the conventional Spring Framework. So, it delivers all the features of Spring.

In Spring Boot most of the things are auto-configured. We just need to use the proper configuration for utilizing a particular functionality.

In this article, we will discuss 7 major points to prove Spring Boot is Best for Microservices Development. Give it a read.

Link- https://www.geeksforgeeks.org/why-to-choose-spring-boot-for-microservices-development/?utm_source=telegram&utm_medium=marketingteam_gfgmain&utm_campaign=springbootformicroservicesdevelopment
Problem Of The Day
"Equal Left and Right Subarray Sum"

Solve the problem to win points

Given an array A of n positive numbers. The task is to find the first index in the array such that the sum of elements before it is equal to the sum of elements after it.

Note: Array is 1-based indexed.

Example 1:
Input:
n = 5
A[] = {1,3,5,2,2}
Output: 3
Explanation: For second test case
at position 3 elements before it
(1+3) = elements after it (2+2).

Example 2:
Input:
n = 1
A[] = {1}
Output: 1
Explanation:
Since its the only element hence
it is the only point.

Your Task:
The task is to complete the function equalSum() which takes the array and n as input parameters and returns the point. Return -1 if no such point exists.

Expected Time Complexily: O(N)
Expected Space Complexily: O(1)

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

Powered by hirist.com
❀1
🚨 Job Alert 🚨
Soroco is hiring for Senior Software Engineer - C#.

Location - Remote/ Permanent work from home
Experience - 4 - 7 Years
Apply by - April 30, 2023

Apply via the following link and share the opportunity with your friends- https://practice.geeksforgeeks.org/jobs/soroco-SSE-developers?utm_source=telegram&utm_medi[…]arketingteam_gfgmain&utm_campaign=soroco-SSE-developers
❀1
YASSSS it's happening πŸ˜ŽπŸ˜ŽπŸ€“

Hundreds of comments on our posts that you want to be on the team and here we see you and got this opportunity for you !!πŸ™ˆ

V simple tasks for you to impress us. 3 days it is!!

Participate here: https://forms.gle/eD46ks21TXc74sf39

See you soon on the other side, Geeks! Good Luck πŸ™Œ
❀3
Problem Of The Day
"Add Minimum Characters"

Solve the problem to win points

Given a string str, find the minimum characters to be added at front of the string to make it a palindrome.

Example 1:
Input:
str = ABCD
Output: 3
Explanation: The resultant string
after adding 3 characters is DCBABCD.
The minimum possible answer is 3.

Example 2:
Input:
str = ABA
Output: 0
Explanation: The given string
is already a palindrome.

Your Task:
You don't need to read input or print anything. Your task is to complete the function addMinChar() which takes the string str as input parameters and returns the minimum number of characters to be added to make it a palindrome.

Expected Time Complexity: O(|str|)
Expected Auxiliary Space: O(|str|)

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

Powered by hirist.com
Problem Of The Day
"Make the array beautiful"

Solve the problem to win points

Given an array of positive and negative integers. You have to make the array beautiful. An array is beautiful if two adjacent integers, arr[i] and arr[i+1] have the same sign. And you can do the following operation any number of times until the array becomes beautiful.

If two adjacent integers have different signs, remove them.
Return the beautiful array after performing the above operation.

Note: An empty array is also a beautiful array. There can be many adjacent integers with different signs. So remove adjacent integers with different signs from left to right.

Example 1:
Input: 4 2 -2 1
Output: 4 1
Explanation: As at indices 1 and 2 , 2 and -2 have
different sign, they are removed. And the the final
array is: 4 1.

Example 2:
Input: 2 -2 1 -1
Output: []
Explanation: As at indices 0 and 1, 2 and -2 have
different sign, so they are removed. Now the array
is 1 -1.Now 1 and -1 are also removed as they have
different sign. So the final array is empty.
Your Task:
You don't need to read input or print anything. Your task is to complete the function makeBeautiful() which takes an array as an input parameter and returns an array.

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

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

Powered by hirist.com
πŸ‘2
It's a last day of the BIGGEST CARNIVAL of the season...🀩

Don't miss your chance to get your hands on the best offers.πŸ™Œ

πŸ‘‰ Grab your favourite courses at the lowest prices,
πŸ‘‰ Get free GfG goodies,
πŸ‘‰ Participate in hiring challenges, and so much more!! 😍🎊

Hurry up!!!

Participate Now- https://practice.geeksforgeeks.org/courses?utm_source=telegram&utm_medium=marketingteam_gfgmain&utm_campaign=gsc2023
πŸ‘2πŸ”₯1
Our team is so excited for this one, geeks 😍

It'd be fun to see what you all guys think can be our alternative name!

Go and comment now- https://www.linkedin.com/feed/update/urn:li:activity:7050342576398245889
Problem Of The Day
"Special Digits"

Solve the problem to win points

Given an array of positive and negative integers. You have to make the array beautiful. An array is beautiful if two adjacent integers, arr[i] and arr[i+1] have the same sign. And you can do the following operation any number of times until the array becomes beautiful.

If two adjacent integers have different signs, remove them.
Return the beautiful array after performing the above operation.

Note: An empty array is also a beautiful array. There can be many adjacent integers with different signs. So remove adjacent integers with different signs from left to right.

Example 1:
Input: 4 2 -2 1
Output: 4 1
Explanation: As at indices 1 and 2 , 2 and -2 have
different sign, they are removed. And the the final
array is: 4 1.

Example 2:
Input: 2 -2 1 -1
Output: []
Explanation: As at indices 0 and 1, 2 and -2 have
different sign, so they are removed. Now the array
is 1 -1.Now 1 and -1 are also removed as they have
different sign. So the final array is empty.

Your Task:
You don't need to read input or print anything. Your task is to complete the function makeBeautiful() which takes an array as an input parameter and returns an array.

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

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

Powered by hirist.com
πŸ‘2
Problem Of The Day
"Maximum Intersecting Lines"

Solve the problem to win points

N horizontal line segments are arranged on the X-axis of a 2D plane. The start and end point of each line segment is given in a Nx2 matrix lines[ ][ ]. Your task is to find the maximum number of intersections possible of any vertical line with the given N line segments.

Example 1:
Input:
N = 4
lines[][] = {{1,3}, {2,3}, {1,2}, {4,4}}
Output:
3
Explanation:
A vertical line at X = 2 passes through
{1,3}, {2,3}, {1,2}, ie three of the
given horizontal lines.

Example 2:
Input:
N = 3
lines[][] = {{1, 3}, {5, 6}, {3,4}}
Output:
2
Explanation:
A vertical line at X = 3 passes through
two of the given horizontal lines which
is the maximum possible.

Your Task:
You dont need to read input or print anything. Complete the function maxIntersections() which takes the 2D Matrix lines[][] and the integer N as input parameters, and returns the maximum intersections possible.

Expected Time Complexity: O(N*log(N))
Expected Auxiliary Space: O(N)

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

Powered by hirist.com
πŸ‘2
Being a web developer is the most demanding and highest-paying job in India or abroad.

Web development has 2 integral aspects – Frontend and Backend.

In this article, we’ll be particularly talking about the complete Front-End Developer Roadmap or how to make a successful career as a front-end developer. Give it a read.

Link- https://www.geeksforgeeks.org/frontend-developer-roadmap/?utm_source=telegram&utm_mediu[…]ketingteam_gfgmain&utm_campaign=frontend-developer-roadmap
πŸ‘3❀1