Add office photos
GeeksForGeeks logo
Employer?
Claim Account for FREE

GeeksForGeeks

3.2
based on 184 Reviews
Filter interviews by
Fresher
Clear (1)

10+ GeeksForGeeks Interview Questions and Answers for Freshers

Updated 13 Nov 2024

Q1. Distribute N Candies Among K People

Explanation: Sanyam wishes to distribute 'N' candies among 'K' friends. The friends are arranged based on Sanyam's order of likeness. He initially distributes candies such th...read more

Ans.

Distribute N candies among K friends in Sanyam's order of likeness, incrementing distribution by K each round.

  • Distribute candies starting from 1st friend, incrementing by K each round

  • If remaining candies are fewer than what a friend is supposed to receive, stop distribution

  • Output the number of candies each friend ends up with at the end of distribution

Add your answer
right arrow

Q2. Anagram Pairs Verification Problem

Your task is to determine if two given strings are anagrams of each other. Two strings are considered anagrams if you can rearrange the letters of one string to form the other...read more

Ans.

Determine if two strings are anagrams of each other by checking if they can be rearranged to form the other string.

  • Create a frequency map of characters for both strings and compare them.

  • Sort both strings and compare them.

  • Use a set to store characters and their counts for each string, then compare the sets.

Add your answer
right arrow
Q3. How would you create a database to store the data of all the patients in a country?
Ans.

Create a centralized database to store patient data for an entire country.

  • Design a relational database schema with tables for patients, doctors, hospitals, medical records, etc.

  • Include unique identifiers for each patient, such as a patient ID.

  • Implement proper security measures to protect sensitive patient information.

  • Consider scalability and performance requirements for handling a large volume of data.

  • Use indexing and optimization techniques to ensure efficient data retrieval...read more

Add your answer
right arrow

Q4. Resource allocation and management using Agile methodologies

Ans.

Agile methodologies focus on iterative resource allocation and management for efficient project delivery.

  • Agile methodologies involve breaking down projects into smaller tasks called user stories

  • Resources are allocated based on priority and availability for each user story

  • Regular meetings like daily stand-ups help in tracking resource allocation and adjusting as needed

Add your answer
right arrow
Discover GeeksForGeeks interview dos and don'ts from real experiences

Q5. What is SEO and How does it help articles get rank better?

Ans.

SEO stands for Search Engine Optimization. It helps articles rank better by improving their visibility and relevance to search engines.

  • SEO involves optimizing content, keywords, meta tags, and backlinks to improve a website's ranking on search engine results pages.

  • By following SEO best practices, articles can attract more organic traffic and reach a wider audience.

  • For example, using relevant keywords in the title and throughout the article can help search engines understand t...read more

Add your answer
right arrow

Q6. What is sparse table and why it is used

Ans.

Sparse table is a data structure used to efficiently answer range queries on an array.

  • Sparse table is used to optimize range query operations on an array.

  • It precomputes and stores the answers to all possible range queries in a table.

  • The table is constructed using a divide-and-conquer approach.

  • Sparse table reduces the time complexity of range queries from O(n) to O(1).

  • It is commonly used in scenarios where range queries are frequent and array elements are static.

View 1 answer
right arrow
Are these interview questions helpful?

Q7. Case where Dijkstra will not work

Ans.

Dijkstra's algorithm will not work when there are negative edge weights in the graph.

  • Dijkstra's algorithm assumes that all edge weights are non-negative.

  • If there are negative edge weights, the algorithm may produce incorrect shortest paths.

  • In such cases, other algorithms like Bellman-Ford or Floyd-Warshall should be used.

  • For example, consider a graph with a negative weight cycle.

View 1 answer
right arrow

Q8. 1- Kth node delete in linked list

Ans.

Deleting the Kth node in a linked list.

  • Traverse the linked list to the Kth node.

  • Update the previous node's next pointer to skip the Kth node.

  • Free the memory allocated to the Kth node.

  • Handle edge cases such as deleting the head or tail node.

Add your answer
right arrow
Share interview questions and help millions of jobseekers 🌟
man with laptop

Q9. How to do Better Keyword Research

Ans.

Keyword research involves identifying relevant keywords for a website to improve search engine rankings.

  • Start by brainstorming relevant topics and themes for your website

  • Use keyword research tools like Google Keyword Planner, SEMrush, or Ahrefs to find related keywords and their search volume

  • Analyze competitor keywords to identify potential opportunities

  • Consider long-tail keywords for more specific and targeted search queries

  • Regularly update and refine your keyword list based...read more

Add your answer
right arrow

Q10. 2- reverse n th time linked list

Ans.

Reverse a linked list n times

  • Create a function to reverse a linked list

  • Loop through the linked list n times and reverse it each time

  • Return the final reversed linked list

Add your answer
right arrow

Q11. how do you do keyword research?

Ans.

Keyword research involves identifying relevant search terms for a website to target in order to improve search engine rankings.

  • Start by brainstorming potential keywords related to the website's content and target audience

  • Use keyword research tools like Google Keyword Planner, SEMrush, or Ahrefs to find search volume and competition for keywords

  • Consider long-tail keywords for more specific and targeted search terms

  • Analyze competitors' keywords to identify opportunities for opt...read more

Add your answer
right arrow

Q12. Dictionary in python

Ans.

A dictionary is a collection of key-value pairs in Python.

  • Keys must be unique and immutable.

  • Values can be of any data type.

  • Access values using keys.

  • Add or modify values using keys.

  • Delete key-value pairs using del keyword.

Add your answer
right arrow

Q13. Minimum Swaps to make it palindrome

Ans.

Minimum number of swaps required to make a given array of strings a palindrome.

  • Create a hash table to store the frequency of each character in the array.

  • Iterate through the array and count the number of characters with odd frequency.

  • If the count is greater than 1, the array cannot be rearranged into a palindrome.

  • Otherwise, use two pointers to swap characters and count the number of swaps required to make the array a palindrome.

Add your answer
right arrow

Q14. What is robots.txt

Ans.

robots.txt is a text file used to instruct search engine crawlers on which pages of a website should not be crawled or indexed.

  • It is located at the root directory of a website.

  • It contains directives like User-agent and Disallow.

  • Example: User-agent: * Disallow: /private/

Add your answer
right arrow
Contribute & help others!
Write a review
Write a review
Share interview
Share interview
Contribute salary
Contribute salary
Add office photos
Add office photos

Interview Process at GeeksForGeeks for Freshers

based on 5 interviews
Interview experience
4.6
Excellent
View more
interview tips and stories logo
Interview Tips & Stories
Ace your next interview with expert advice and inspiring stories

Top Interview Questions from Similar Companies

Paytm Logo
3.3
 • 459 Interview Questions
Adobe Logo
3.9
 • 366 Interview Questions
Bajaj Finserv Logo
4.0
 • 242 Interview Questions
Quest Global Logo
3.6
 • 146 Interview Questions
Globant Logo
3.8
 • 135 Interview Questions
View all
Recently Viewed
SALARIES
BMC Software
SALARIES
BMC Software
JOBS
Epicor Software Corporation
No Jobs
INTERVIEWS
GeeksForGeeks
No Interviews
INTERVIEWS
Yamaha Motor
No Interviews
SALARIES
BMC Software
INTERVIEWS
Forever Living Products
No Interviews
INTERVIEWS
Yamaha Motor
No Interviews
INTERVIEWS
Honda Motorcycle & Scooter
No Interviews
INTERVIEWS
Yamaha Motor
No Interviews
Top GeeksForGeeks Interview Questions And Answers
Share an Interview
Stay ahead in your career. Get AmbitionBox app
play-icon
play-icon
qr-code
Helping over 1 Crore job seekers every month in choosing their right fit company
75 Lakh+

Reviews

5 Lakh+

Interviews

4 Crore+

Salaries

1 Cr+

Users/Month

Contribute to help millions

Made with ❤️ in India. Trademarks belong to their respective owners. All rights reserved © 2024 Info Edge (India) Ltd.

Follow us
  • Youtube
  • Instagram
  • LinkedIn
  • Facebook
  • Twitter