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
Node.js and Web browsers are two different but interrelated technologies in web development. JavaScript is executed in both the environment, node.js, and browser but for different use cases.

Since JavaScript is the common Programming language in both, it is a huge advantage for developers to code both front-end and backend in the same language. Despite the similarities, there is a huge difference between Node.js and the browser.

In this article, we will see why to differentiate both and some of the top differences between Node.js and Browser, that every developer should know. But before that letโ€™s first understand what is node.js and the browser.

Link- https://bit.ly/3YEHEYx
๐Ÿฅฐ1
๐ŸšจJob Alert๐Ÿšจ
pwc is hiring for Software Engineer Intern.

Location - Kolkata
Experience - Fresher
Apply by - Sep 30, 2023

Apply via the following link and share the opportunity with your friends- https://www.geeksforgeeks.org/jobs/pwc-trainee-ext?utm_source=telegram&utm_medium=marketingteam_gfgmain&utm_campaign=github
๐Ÿ‘1
Problem Of The Day
"Fraction pairs with sum 1"

Given a list of N fractions, represented as two lists numerator and denominator, the task is to determine the count of pairs of fractions whose sum equals 1.

Example 1:

Input:
N = 4
numerator = [1, 2, 2, 8]
denominator = [2, 4, 6, 12]
Output:
2
Explanation:
Fractions 1/2 and 2/4 sum to 1. Similarly fractions 2/6 and 8/12 sum to 1. So there are 2 pairs of fractions which sum to 1.

Example 2:

Input:
N = 5
numerator = [3, 1, 12, 81, 2]
denominator = [9, 10, 18, 90, 5]
Output:
2
Explanation:
Fractions 3/9 and 12/18 sum to 1. Similarly fractions 1/10 and 81/90 sum to 1. So there are 2 pairs of fractions which sum to 1.

Your task:
You don't need to read input or print anything. Your task is to complete the function countFractions() which take integer N and arrays numerator and denominator of size N as arguments, and returns an integer.

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

Solve and submit your answer here : https://practice.geeksforgeeks.org/problems/fraction-pairs-with-sum-1/1
๐Ÿ‘3
Documentation is written data or instructions that outline a certain problem statement, approaches, functionality, workflow, architecture, challenges, and development process.

Documentations can be used to gain a comprehensive understanding of the solutionโ€™s functionality, installation, and configurations at once.

Writing good documentation holds immense significance in the world of software development. In this article, you will get the significance of a documentation process and 10 tips and best practices to write better documentation.

Link- https://bit.ly/45kkb0Q
๐Ÿ‘2
Problem Of The Day
"Largest prime factor"

Given a number N, the task is to find the largest prime factor of that number.

Example 1:

Input:
N = 5
Output:
5
Explanation:
5 has 1 prime factor i.e 5 only.

Example 2:

Input:
N = 24
Output:
3
Explanation:
24 has 2 prime factors 2 and 3 in which 3 is greater.

Your Task:
You don't need to read input or print anything. Your task is to complete the function largestPrimeFactor() which takes an integer N as input parameters and returns an integer, largest prime factor of N.

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

Solve and submit your answer here : https://practice.geeksforgeeks.org/problems/largest-prime-factor2601/1
๐Ÿ‘6
๐ŸšจJob Alert๐Ÿšจ
Futurelens Technology is hiring for Software Engineer Intern.

Location - Surat, Gujarat
Experience - 0.5 - 3 Years
Apply by - Sep 02, 2023

Apply via the following link and share the opportunity with your friends- https://www.geeksforgeeks.org/jobs/futurelenstechnology-flutter-developer?utm_source=telegram&utm_medium=marketingteam_gfgmain&utm_campaign=github
๐Ÿ‘1
Problem Of The Day
"Longest Common Subsequence"

Given two strings, find the length of longest subsequence present in both of them. Both the strings are in uppercase latin alphabets.

Example 1:

Input:
A = 6, B = 6
str1 = ABCDGH
str2 = AEDFHR
Output: 3
Explanation: LCS for input strings โ€œABCDGHโ€ and โ€œAEDFHRโ€ is โ€œADHโ€ of length 3.

Example 2:

Input:
A = 3, B = 2
str1 = ABC
str2 = AC
Output: 2
Explanation: LCS of "ABC" and "AC" is "AC" of length 2.

Your Task:
Complete the function lcs() which takes the length of two strings respectively and two strings as input parameters and returns the length of the longest subsequence present in both of them.

Expected Time Complexity : O(|str1|*|str2|)
Expected Auxiliary Space: O(|str1|*|str2|)

Solve and submit your answer here : https://practice.geeksforgeeks.org/problems/longest-common-subsequence-1587115620/1
๐Ÿ‘3
Must Learn!๐Ÿ’ก
Itโ€™s very important to stay up-to-date with the technologies to bring advancement within yourself as well as in the organizations. Java 8 has been a reliable choice, but If youโ€™re a Java Developer then you must know how to be well-informed about current advancements in technology.

In this blog, weโ€™ll dive into the advantages of Java 17 and showcase real-world examples that will give you a clear view of the current scenario of advancing technology with the latest version from Java 8 to Java 17 as well as developers can put to good use of this version.

Link- https://bit.ly/3qsqxwb
๐Ÿ‘3
Problem Of The Day
"Coin Change"

Given an integer array coins[ ] of size N representing different denominations of currency and an integer sum, find the number of ways you can make sum by using different combinations from coins[ ].
Note: Assume that you have an infinite supply of each type of coin. And you can use any coin as many times as you want.

Example 1:

Input:
N = 3, sum = 4
coins = {1,2,3}
Output: 4
Explanation: Four Possible ways are: {1,1,1,1},{1,1,2},{2,2},{1,3}.

Example 2:

Input:
N = 4, Sum = 10
coins = {2,5,3,6}
Output: 5
Explanation: Five Possible ways are: {2,2,2,2,2}, {2,2,3,3}, {2,2,6}, {2,3,5} and {5,5}.

Your Task:
You don't need to read input or print anything. Your task is to complete the function count() which accepts an array coins its size N and sum as input parameters and returns the number of ways to make change for given sum of money.

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

Solve and submit your answer here : https://practice.geeksforgeeks.org/problems/coin-change2448/1
๐Ÿ‘5โค2
We caught you waiting!

We are back with GFG Weekly Coding Contest to help you become a proficient coder.

So, register now - https://bit.ly/3s6mJ4h
Problem Of The Day
"Longest Increasing Subsequence"

Given an array of integers, find the length of the longest (strictly) increasing subsequence from the given array.

Example 1:

Input:
N = 16
A = {0,8,4,12,2,10,6,14,1,9,5,13,3,11,7,15}
Output:
6
Explanation:
There are more than one LIS in this array. One such Longest increasing subsequence is {0,2,6,9,13,15}.

Example 2:

Input:
N = 6
A[] = {5,8,3,7,9,1}
Output:
3
Explanation:
There are more than one LIS in this array. One such Longest increasing subsequence is {5,7,9}.

Your Task:
Complete the function longestSubsequence() which takes the input array and its size as input parameters and returns the length of the longest increasing subsequence.

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

Solve and submit your answer here : https://practice.geeksforgeeks.org/problems/longest-increasing-subsequence-1587115620/1
๐Ÿ‘4
๐Ÿšจ Job Alert ๐Ÿšจ
LaMinds is hiring for Asp Dot Net Fresher.

Location - Bengaluru, Karnataka, India (On-site)
Experience - Fresher
Apply by - Sep 30, 2023

Apply via the following link and share the opportunity with your friends- https://www.geeksforgeeks.org/jobs/lamind-asp-dotnet-fresher?utm_source=telegram&utm_medium=marketingteam_gfgmain&utm_campaign=github
๐Ÿ‘2
Problem Of The Day
"Nth Fibonacci Number"

Given a positive integer n, find the nth fibonacci number. Since the answer can be very large, return the answer modulo 1000000007.

Example 1:

Input:
n = 2
Output:
1
Explanation:
1 is the 2nd number of fibonacci series.

Example 2:

Input:
n = 5
Output:
5
Explanation:
5 is the 5th number of fibonacci series.

Your Task:
You dont need to read input or print anything. Complete the function nthFibonacci() which takes n as input parameter and returns nth fibonacci number.

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

Solve and submit your answer here : https://practice.geeksforgeeks.org/problems/nth-fibonacci-number1335/1
๐Ÿ‘2
๐Ÿšจ Job Alert ๐Ÿšจ
Microsoft is hiring for Software Engineer.

Location - Hyderabad, Bengaluru, Noida
Experience - Internship
Apply by - Sep 11, 2023

Apply via the following link and share the opportunity with your friends- https://www.geeksforgeeks.org/jobs/microsoft-software-eng-internship?utm_source=telegram&utm_medium=marketingteam_gfgmain&utm_campaign=github
Problem Of The Day
"Non Repeating Numbers"

Given an array A containing 2*N+2 positive numbers, out of which 2*N numbers exist in pairs whereas the other two number occur exactly once and are distinct. Find the other two numbers. Return in increasing order.

Example 1:

Input:
N = 2
arr[] = {1, 2, 3, 2, 1, 4}
Output:
3 4
Explanation:
3 and 4 occur exactly once.

Example 2:

Input:
N = 1
arr[] = {2, 1, 3, 2}
Output:
1 3
Explanation:
1 3 occur exactly once.

Your Task:
You do not need to read or print anything. Your task is to complete the function singleNumber() which takes the array as input parameter and returns a list of two numbers which occur exactly once in the array. The list must be in ascending order.

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

Solve and submit your answer here : https://practice.geeksforgeeks.org/problems/finding-the-numbers0215/1
๐Ÿ‘3
Must Learn!๐Ÿ’ก
Javascript APIs are those that use Javascript code to establish this communication. As they play a crucial role in web development due to their vast capabilities and the widespread use of the language in the software development field, Web APIs are typically used with JavaScript.

While there exist a good amount of APIs that can be employed by a developer, the below article compiles a list of the Top 10 JavaScript APIs.

Link- https://bit.ly/45vFWLb
๐Ÿ‘2โค1
Happy Independence Day....๐Ÿ‡ฎ๐Ÿ‡ณ
โค10๐Ÿ‘4
Problem Of The Day
"Flip Bits"

Given an array A[] consisting of 0โ€™s and 1โ€™s. A flip operation is one in which you turn 1 into 0 and a 0 into 1. You have to do at most one โ€œFlipโ€ operation of any subarray. Formally, select a range (l, r) in the array A[], such that (0 โ‰ค l โ‰ค r < n) holds and flip the elements in this range to get the maximum ones in the final array. You can possibly make zero operations to get the answer.

Example 1:

Input:
N = 5
A[] = {1, 0, 0, 1, 0}
Output:
4
Explanation:
We can perform a flip operation in the range [1,2]
After flip operation array is : [ 1 1 1 1 0 ]
Count of one after fliping is : 4
[Note: the subarray marked in bold is the flipped subarray]

Example 2:

Input:
N = 7
A[] = {1, 0, 0, 1, 0, 0, 1}
Output:
6
Explanation:
We can perform a flip operation in the range [1,5]
After flip operation array is : [ 1 1 1 0 1 1 1]
Count of one after fliping is : 6
[Note: the subarray marked in bold is the flipped subarray]

Your Task:
You don't need to read input or print anything. Your task is to complete the function maxOnes() which takes the array A[] and its size N as inputs and returns the maximum number of 1's you can have in the array after atmost one flip operation.

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

Solve and submit your answer here : https://practice.geeksforgeeks.org/problems/flip-bits0240/1
Problem Of The Day
"Nth catalan number"

Given a number N. The task is to find the Nth catalan number.
The first few Catalan numbers for N = 0, 1, 2, 3, โ€ฆ are 1, 1, 2, 5, 14, 42, 132, 429, 1430, 4862, โ€ฆ

Catalan Number for N is equal to the number of expressions containing N pairs of paranthesis that are correct matched, i.e., for each of the N '(' there exist N ')' on there right and vice versa.

Since answer can be huge return answer modulo 1e9+7.

Note: Positions start from 0 as shown above.

Example 1:

Input:
N = 5
Output: 42

Example 2:

Input:
N = 4
Output: 14

Your Task:
Complete findCatalan() function that takes n as an argument and returns the Nth Catalan number. The output is printed by the driver code.

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

Solve and submit your answer here : https://practice.geeksforgeeks.org/problems/nth-catalan-number0817/1
๐Ÿ‘1
Must Learn!
The software development industry is expanding rapidly due to technological advancements. Backend development is the backbone of software development; it acts as a funnel between the front end and the database. Backend developers have endless options for developing, deploying, and managing server-side applications.

In this article, we will discuss in detail about top 10 backend development trends. We will also discuss backend development, the roles, and responsibilities of backend developers, and the benefits of using backend frameworks. So letโ€™s get started.

Link - https://bit.ly/3KBrYPK
๐Ÿ‘1