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
Must Learn!πŸ’‘
ChatGPT is capable of giving answers to almost everything you ask it.

Recently, the jailbreaking prompts worked well on ChatGPT and the AI chatbot successfully ignored its safety and privacy statement and produced answers to unethical, illegal, and harmful questions.

This article talks about the topic in detail. Give it a read.

Link- https://www.geeksforgeeks.org/what-is-jailbreak-chat/?utm_source=telegram&utm_medium=marketingteam_gfgmain&utm_campaign=what-is-jailbreak-chat
🚨Job Alert🚨
Brudite is hiring for Software Engineer.

Location - Jaipur, Rajasthane
Experience - Internship + PPO
Apply by - Jun 09, 2023

Apply via the following link and share the opportunity with your friends- https://www.geeksforgeeks.org/jobs/brudite-private-limited-associate-software-engineer?utm_source=telegram&utm_medium=marketingteam_gfgmain&utm_campaign=brudite-private-limited-associate-software-engineer

πŸ“’ Also, do not miss the chance to get endless opportunities at Jobs Fair 2023 (Exclusively for Students) - https://www.geeksforgeeks.org/jobs?tab=studentjobfair
Problem Of The Day
"Palindrome with minimum sum"

Solve the problem to win points

Given a string, S.The string can contain small case English letters or '?'. You can replace '?' with any small English letter. Now if it is possible to make the string S a palindrome after replacing all '?' then find the palindromic string with a minimum ascii sum of differences of adjacent characters. Otherwise, return -1.

Example 1:
Input: S = a???c??c????
Output: 4
Explanation:
We can see that we can make the string
palindrome. Now to get minimum ascii sum we should
replace all the '?' between 'a' and 'c' with
'b' and all the '?' between two 'c' with 'c'.
So after replacing all the '?' the string:
abbbccccbbba.
The sum of differences of adjacent characters is 4.

Example 2:
Input: S = a???c??c???c
Output: -1
Explanation:
It is not possible to make the string palindrome.

Your Task:
You don't need to read input or print anything. Your task is to complete the function minimumSum() which takes a string S input parameter and returns an integer denoting the sum of differences of adjacent characters. If it is not possible to make string palindrome, return -1.

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

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

Powered by hirist.com
πŸ‘1
Must Learn!πŸ’‘
Developers or be they any learner, everyone is relying on ChatGPT for gathering information.

ChatGPT-4 helps us to use creative ways to build something awesome. It helps developers to build web apps quickly and efficiently.

In this article, we’ll be talking about the 10 Best Ways Developers Can Use ChatGPT-4.

Link- https://www.geeksforgeeks.org/how-developers-can-use-chatgpt-4/?utm_source=discord&utm_medium=marketingteam_gfgmain&utm_campaign=how-developers-can-use-chatgpt-4%2F
πŸ‘1
Your will to work gets stronger when your skills are respected. This is another edition of the best opportunities!πŸ˜ƒπŸ€Œ

The hiring challenge where you showcase your skills and get a chance to work with the best organizations. This we are here with Job-A-Thon 20 with a number of great opportunities.🎊

Embrace your future with the best opportunities.πŸ™Œβœ¨

Register here: https://practice.geeksforgeeks.org/contest/job-a-thon-20-hiring-challenge
Problem Of The Day
"Array Operations"

Solve the problem to win points

You are given an array arr of n integers. You must return the minimum number of operations required to make this array 0. For this you can do an operation :

Choose a sub-array of non-zero elements & replace all with 0(0 must be present in arr, if not you can not replace it).

Example 1:
Input:
n = 4
arr = {3,0,4,5}
Output:
2
Explanation:
First, we can choose 3 replace with 0(which is on 1st Index) and in the second operation, we can choose 4 & 5 -> replace with 0(1st Index).

Your Task:
You don't need to read input or print anything. Your task is to complete the function arrayOperations() which takes an integer n and an array arr as inputs and find the minimum number of operations you must perform to make all the elements of the array 0. If not possible return -1;

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

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

Powered by hirist.com
❀1
Must Learn!πŸ’‘
From becoming a video game content creator to becoming a professional eSports player, there are a lot of easy through which you can earn money while playing video games!

In this article, we’ll explore some great ways by which you can make money through video games. Give it a read.

Link- https://www.geeksforgeeks.org/make-money-through-video-games/?utm_source=telegram&utm_medium=marketingteam_gfgmain&utm_campaign=make-money-through-video-games%2F
❀2πŸ‘2
A direct slop to success. Many dreams came true and so will yours.πŸ˜ƒπŸ€Œ

Are you still waiting? Why?πŸ™„πŸ€”

So, don't wait, act now and apply for the best job opportunities.πŸ˜ƒπŸ™Œ

Apply here: https://www.geeksforgeeks.org/jobs?tab=studentjobfair
Problem Of The Day
"Array Operations"

Solve the problem to win points

Given an integer array arr[] of size n which contains only 1 and 0. Your task is to make the array perfect. An array is said to be perfect if for each i from 0 to n-1 arr[i]==arr[n-1-i] is satisfied.

To Make the array perfect you are allowed to do the following operation :

In one operation you can choose two different indexes i and j and set value of both arr[i] and arr[j] to arr[i]^arr[j].

Your task is to make the array perfect in minimum possible number of operations and return the number of operations.

Note: 0-based indexing is used.

Example 1:
Input:
n = 4
arr = {1,0,0,0}
Output:
1
Explanation:
We can take index 0 and 3 and apply the operation.
Array becomes {1,0,0,1}.Now the condition is satisfied

Example 2:
Input:
n = 3
arr = {1,0,1}
Output:
0
Explanation:
condition is satisfied intially. So no operation is required
in this case.

Your Task:
You don't need to read input or print anything. Your task is to complete the function bitMagic() which takes an integer n and a binary integers array arr respectively and returns the minimum number of operations required to make the array perfect.

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

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

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

Solve the problem to win points

Given an array A of size N. Find the maximum subset-sum of elements that you can make from the given array such that for every two consecutive elements in the array, at least one of the elements is present in our subset.

Example 1:
Input:
N = 4
A[] = {1, -1, 3, 4}
Output: 8
Explanation:
We can choose 0th,2nd & 3rd index(0 based
Index),so that it can satisfy the
condition & can make maximum sum 8.

Example 2:
Input:
N = 3
A[] = {0, 2, 0};
Output: 2
Explanation:
We can choose 1st index. Here the
maximum possible sum is 2.

Your task:
You don't have to read input or print anything. Your task is to complete the function findMaxSubsetSum() which takes the array A and its size N as input and returns the Maximum possible subset-sum.

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

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

Powered by hirist.com
πŸ‘1
Problem Of The Day
"Count Total Setbits"

Solve the problem to win points

You are given a number N. Find the total number of setbits in the numbers from 1 to N.

Example 1:
Input: N = 3
Output: 4
Explaination:
1 -> 01, 2 -> 10 and 3 -> 11.
So total 4 setbits.

Example 2:
Input: N = 4
Output: 5
Explaination: 1 -> 01, 2 -> 10, 3 -> 11
and 4 -> 100. So total 5 setbits.

Your Task:
You do not need to read input or print anything. Your task is to complete the function countBits() which takes N as input parameter and returns the total number of setbits upto N.

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

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

Powered by hirist.com
Job-A-Thon 20
Qservices Inc is hiring for Node JS Developer.

Location - Mohali, Punjab
Experience - Internship
Apply by - May 21, 2023

Apply via the following link and share the opportunity with your friends- https://practice.geeksforgeeks.org/jobs/qservices-inc-job-a-thon20-node-js?utm_source=telegram&utm_medium=marketingteam_gfgmain&utm_campaign=qservices-inc-job-a-thon20-node-js

Also, do not miss the chance to get endless opportunities at Jobs Fair 2023 (Exclusively for Students) - https://www.geeksforgeeks.org/jobs?tab=studentjobfair
Job-A-Thon 20
Oyelabs is hiring for Software Quality Assurance Engineer Internship.

Location - Remote
Experience - Fresher
Apply by - May 21, 2023

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

Also, do not miss the chance to get endless opportunities at Jobs Fair 2023 (Exclusively for Students) - https://www.geeksforgeeks.org/jobs?tab=studentjobfair
❀1πŸ‘1
Job-A-Thon 20
Dimensionless Technologies is hiring for FullStack Intern.

Location - Navi Mumbai (Vashi) | Work from Office
Experience - Internship
Apply by - May 21, 2023

Apply via the following link and share the opportunity with your friends- https://practice.geeksforgeeks.org/jobs/dimensionless-job-a-thon20-fullstack-intern?utm_source=telegram&utm_medium=marketingteam_gfgmain&utm_campaign=dimensionless-job-a-thon20-fullstack-intern

Also, do not miss the chance to get endless opportunities at Jobs Fair 2023 (Exclusively for Students) - https://www.geeksforgeeks.org/jobs?tab=studentjobfair
Must Learn!πŸ’‘
The term β€œBlockchain” is a combination of the words β€œblock” and β€œchainβ€œ. Each block contains data and is linked to the previous block, forming a chain.

Once data is recorded on the blockchain, it cannot be modified. Isn't it interesting? Learn about the blockchain in detail by clicking on the following link.

Link- https://www.geeksforgeeks.org/why-blockchain-technology-is-the-future/?utm_source=teleg[…]um=marketingteam_gfgmain&utm_campaign=blockchaintechnology
The more you wait, the more you get confused and want that to happen with you.☺️

Your dream opportunities are just a click away. Don't let them slip away from your hands.πŸ˜πŸ™‚

So, wait no more, act now! Participate in Job Fair (for students) 2023 and make your way to a successful career.πŸ™‚πŸ™Œ

Apply here: https://www.geeksforgeeks.org/jobs?tab=studentjobfair
Job-A-Thon 20
Captainweb LLP is hiring for PHP Developer.

Location - Pune
Experience - 0.5 - 1 Years
Apply by - May 21, 2023

Apply via the following link and share the opportunity with your friends- https://practice.geeksforgeeks.org/jobs/CaptainwebLLP-PHP-Web-Developer-Job-A-Thon-20?utm_source=telegram&utm_medium=marketingteam_gfgmain&utm_campaign=CaptainwebLLP-PHP-Web-Developer-Job-A-Thon-20

Also, do not miss the chance to get endless opportunities at Jobs Fair 2023 (Exclusively for Students) - https://www.geeksforgeeks.org/jobs?tab=studentjobfair
Problem Of The Day
"Cutting Binary String"

Solve the problem to win points

Given a string s containing 0's and 1's. You have to return the smallest positive integer C, such that the binary string can be cut into C pieces and each piece should be of the power of 5 with no leading zeros.
Note: The string s is a binary string. And if no such cuts are possible, then return -1.

Example 1:
Input:
s = "101101101"
Output:
3
Explanation:
We can split the given string into
three 101s, where 101 is the binary
representation of 5.

Example 2:
Input:
s = "00000"
Output:
-1
Explanation:
0 is not a power of 5.

Your Task:
Your task is to complete the function cuts() which take a single argument(string s). You need not take any input or print anything. Return an int C if the cut is possible else return -1.

Expected Time Complexity: O(|s|*|s|*|s|).
Expected Auxiliary Space: O(|s|).

Solve and submit your answer here : https://practice.geeksforgeeks.org/problems/cutting-binary-string1342/1

Powered by hirist.com
πŸ‘3
Job-A-Thon 20
Qservices Inc is hiring for React JS Developer.

Location - Mohali, Punjab
Experience - Internship
Apply by - 10 K - 15 K

Apply via the following link and share the opportunity with your friends- https://practice.geeksforgeeks.org/jobs/qservices-inc-job-a-thon20-react-js?utm_source=tel[…]um=marketingteam_gfgmain&utm_campaign=jobathon20reactjs

Also, do not miss the chance to get endless opportunities at Jobs Fair 2023 (Exclusively for Students) - https://www.geeksforgeeks.org/jobs?tab=studentjobfair