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-A-Thon 22 4.pdf
159.1 KB
🀬1πŸ’©1🍌1
GeeksforGeeks
Job-A-Thon 22 4.pdf
Make the move towards success. πŸ˜ƒ Because the best organizations are here to add charm to your career. πŸš€

Now, is the time to work with your dream organizations. Job-A-Thon 22 is here!!🎊 Hurry up and register now.

NOTE: This Job-A-Thon 22 is powered by IU University.
Study online with IU & Get Up-to 67% scholarship. Explore tech degrees from IU University.

Register here-
Domain2Conversion:
Flutter Developer- https://bit.ly/45YDkGo
BitCot:
IOS Developer- https://bit.ly/463VIgy
PHP Developer- https://bit.ly/3Lo3ji2
Python Developer- https://bit.ly/3Loy7z8
Linumiz:
Associate Software Engineer- https://bit.ly/3PFHddo

Job-A-Thon details here - https://bit.ly/44Nqaul
This is 120th edition of the GFG Weekly Coding Contest has entered the room. πŸ™Œ

Upskill, because career advancement begins here!πŸ˜ƒ

So, we are back with GFG Weekly Coding Contest to help you become a proficient coder.😎

So, register now - https://bit.ly/3r8iuoP
Problem Of The Day
"Count number of hops"

A frog jumps either 1, 2, or 3 steps to go to the top. In how many ways can it reach the top of Nth step. As the answer will be large find the answer modulo 1000000007.

Example 1:

Input:
N = 1
Output: 1

Example 2:

Input:
N = 4
Output: 7
Explanation:Below are the 7 ways to reach
4
1 step + 1 step + 1 step + 1 step
1 step + 2 step + 1 step
2 step + 1 step + 1 step
1 step + 1 step + 2 step
2 step + 2 step
3 step + 1 step
1 step + 3 step

Your Task:
Your task is to complete the function countWays() which takes 1 argument(N) and returns the answer%(10^9 + 7).

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

Solve and submit your answer here : https://practice.geeksforgeeks.org/problems/count-number-of-hops-1587115620/1
Must Learn!πŸ’‘
Most technologies that form the foundation of the web as we know it are Open Source starting from the most popular programming languages: HTML, C++, Python, etc. to the Android technology that powers our smartphones.

The Open Source is a vast and expansive space with over 29 million projects coded in the JavaScript language alone. A collaborative platform like Github and the countless submissions made on it every day is just an example of the deep footprint of Open Source in the life of developers.

Link- https://bit.ly/3PnfvRq
πŸ‘4
Problem Of The Day
"Print first n Fibonacci Numbers"

Given a number N, find the first N Fibonacci numbers. The first two number of the series are 1 and 1.

Example 1:

Input:
N = 5
Output: 1 1 2 3 5

Example 2:

Input:
N = 7
Output: 1 1 2 3 5 8 13

Your Task:
Your task is to complete printFibb() which takes single argument N and returns a list of first N Fibonacci numbers.

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

Note: This space is used to store and return the answer for printing purpose.

Solve and submit your answer here : https://practice.geeksforgeeks.org/problems/print-first-n-fibonacci-numbers1002/1
πŸ”₯4πŸ‘3
Must Learn!πŸ’‘
Merge sort is defined as a sorting algorithm that works by dividing an array into smaller subarrays, sorting each subarray, and then merging the sorted subarrays back together to form the final sorted array.

Let us discuss some of the interview questions asked about Merge Sort.

Link- https://bit.ly/3PnbMDv
πŸ‘2
Problem Of The Day
"Power of 2"

Given a non-negative integer N. The task is to check if N is a power of 2. More formally, check if N can be expressed as 2x for some integer x.

Example 1:

Input:
N = 8
Output:
YES
Explanation:
8 is equal to 2 raised to 3 (23 = 8).

Example 2:

Input:
N = 98
Output:
NO
Explanation:
98 cannot be obtained by any power of 2.

Your Task:
Your task is to complete the function isPowerofTwo() which takes n as a parameter and returns true or false by checking if the given number can be represented as a power of two or not.

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

Solve and submit your answer here : https://practice.geeksforgeeks.org/problems/power-of-2-1587115620/1
πŸ‘3
Your Words, Your Rewards πŸ’°πŸ”₯

A great opportunity for all the writers out there! Do not miss it, Start Writing Now πŸ’ͺ

Start Writing Now : https://bit.ly/GPL2023
πŸ‘1
Job-A-Thon 22 5.pdf
161.3 KB
🀬1πŸ’©1🍌1
GeeksforGeeks
Job-A-Thon 22 5.pdf
The phone won't stop ringing. πŸ˜ƒ Because this is your career's call! The best organizations are here to add charm to your career. πŸš€

Now, is the time to work with your dream organizations. Job-A-Thon 22 is here!!🎊 Hurry up and register now.

NOTE: This Job-A-Thon 22 is powered by IU University.
Study online with IU & Get Up-to 67% scholarship. Explore tech degrees from IU University.

Register here: https://bit.ly/3PgmFqF
Problem Of The Day
"Find first set bit"

Given an integer N. The task is to return the position of first set bit found from the right side in the binary representation of the number.
Note: If there is no set bit in the integer N, then return 0 from the function.

Example 1:

Input:
N = 18
Output:
2
Explanation:
Binary representation of 18 is 010010,the first set bit from the right side is at position 2.

Example 2:

Input:
N = 12
Output:
3
Explanation:
Binary representation of 12 is 1100, the first set bit from the right side is at position 3.

Your Task:
The task is to complete the function getFirstSetBit() that takes an integer n as a parameter and returns the position of first set bit.

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

Solve and submit your answer here : https://practice.geeksforgeeks.org/problems/find-first-set-bit-1587115620/1
πŸ‘2
Must Learn! πŸ’‘
A project can be as simple as ensuring the planning of a small-scale event or something as large-scale as the deployment of a worldwide social media application.

The Project Manager is the entity responsible for the smooth execution of these phases.

They achieve the end results by guiding their team members – being responsible for the various aspects of the project and effectively extracting their services to meet the deadlines and produce the outcomes required.

Link- https://bit.ly/3ZpledR
πŸ‘2
Make the move towards success. πŸ˜ƒ Because the best organizations are here to add charm to your career. πŸš€

Now, is the time to work with your dream organizations. Job-A-Thon 22 is here!!🎊 Hurry up and register now.

NOTE: This Job-A-Thon 22 is powered by IU University.
Study online with IU & Get Up-to 67% scholarship. Explore tech degrees from IU University.

Register here: https://bit.ly/3PgmFqF
πŸ‘1
Problem Of The Day
"Rotate Bits"

Given an integer N and an integer D, rotate the binary representation of the integer N by D digits to the left as well as right and return the results in their decimal representation after each of the rotation.
Note: Integer N is stored using 16 bits. i.e. 12 will be stored as 0000000000001100.

Example 1:

Input:
N = 28, D = 2
Output:
112
7
Explanation:
28 in Binary is: 0000000000011100
Rotating left by 2 positions, it becomes 0000000001110000 = 112 (in decimal).
Rotating right by 2 positions, it becomes 0000000000000111 = 7 (in decimal).

Example 2:

Input:
N = 29, D = 2
Output:
116
16391
Explanation:
29 in Binary is: 0000000000011101
Rotating left by 2 positions, it becomes 0000000001110100 = 116 (in decimal).
Rotating right by 2 positions, it becomes 100000000000111 = 16391 (in decimal).

Your Task:
You don't need to read input or print anything. Your task is to complete the function rotate() which takes the integer N and integer D as inputs and returns an array of size 2 where arr[0] = Decimal value after left rotation and arr[1] = Decimal value after right rotation.

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

Solve and submit your answer here : https://practice.geeksforgeeks.org/problems/rotate-bits4524/1
πŸ‘2
Must Learn!πŸ’‘
Relational databases store and manage data in rows and columns, in tabular forms which are used for showing different data and different values.

Some examples of relational databases are MS SQL Server, MySQL, and MS Access. SQL can create, delete, update, and retrieve information from databases. Data Analysts use SQL so that they can optimize database performance.

Link- https://bit.ly/44YtAKW
❀1πŸ‘1
Problem Of The Day
"Stickler Thief"

Stickler the thief wants to loot money from a society having n houses in a single line. He is a weird person and follows a certain rule when looting the houses. According to the rule, he will never loot two consecutive houses. At the same time, he wants to maximize the amount he loots. The thief knows which house has what amount of money but is unable to come up with an optimal looting strategy. He asks for your help to find the maximum money he can get if he strictly follows the rule. ith house has a[i] amount of money present in it.

Example 1:

Input:
n = 5
a[] = {6,5,5,7,4}
Output:
15
Explanation:
Maximum amount he can get by looting 1st, 3rd and 5th house. Which is 6+5+4=15.

Example 2:

Input:
n = 3
a[] = {1,5,3}
Output:
5
Explanation:
Loot only 2nd house and get maximum amount of 5.

Your Task:
Complete the functionFindMaxSum() which takes an array arr[] and n as input which returns the maximum money he can get following the rules.

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

Solve and submit your answer here : https://practice.geeksforgeeks.org/problems/stickler-theif-1587115621/1
πŸ‘4❀1πŸ’©1πŸ•Š1🍌1
Must Learn!πŸ’‘
Code smell leads to many problems in your code such as poor readability, longer debugging time, or difficulty in maintaining the project for a longer time.

Most often developers follow these bad practices due to the deadline pressure or due to the lack of depth about the entire product. They keep adding and changing the code, but most of the time they forget to improve in the code.

Link- https://bit.ly/3PsIOBT
🚨 Job Alert 🚨
Citi is hiring for Java Developer.

Location - Onsite - Pune (Maharashtra)
Experience - 1+ Years
Apply by - Oct 30, 2023

Apply via the following link and share the opportunity with your friends - https://bit.ly/3PNVVzh
Problem Of The Day
"First and last occurrences of x"

Given a sorted array arr containing n elements with possibly duplicate is to find indexes of first elements, the task is to find the first and last occurrences of an element x in the given array.
Note: If the number x is not found in the array then return both the indices as -1.

Example 1:

Input:
n=9, x=5
arr[] = { 1, 3, 5, 5, 5, 5, 67, 123, 125 }
Output:
2 5
Explanation:
First occurrence of 5 is at index 2 and last occurrence of 5 is at index 5.

Example 2:

Input:
n=9, x=7
arr[] = { 1, 3, 5, 5, 5, 5, 7, 123, 125 }
Output:
6 6
Explanation:
First and last occurrence of 7 is at index 6.

Your Task:
Since, 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 find() that takes array arr, integer n and integer x as parameters and returns the required answer.

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

Solve and submit your answer here : https://practice.geeksforgeeks.org/problems/first-and-last-occurrences-of-x3116/1
πŸ‘2