Back to Browse

Smallest and Largest Word in a String | Python Solution | Cognizant SDE Sheet GFG

50 views
Jul 9, 2025
7:59

In this video, we solve the popular "Smallest and Largest Word in a String" problem, which is featured in the Cognizant SDE Sheet on GeeksforGeeks (GFG). This is a beginner-friendly string manipulation problem, and we approach it using simple Python logic that’s great for interviews and coding assessments. 📌 Problem Statement: Given a string, find the word with the minimum and maximum length and print them. 📌 What you’ll learn: Breaking the string into words How to find the smallest and largest word Python implementation explained step-by-step Time complexity and edge cases covered 👨‍💻 Language Used: Python 🎯 This question is part of the Cognizant SDE preparation sheet and is commonly asked in tech interviews at TCS, Infosys, Capgemini, Cognizant, Wipro, and more. 💬 Share your thoughts, questions, or alternate solutions in the comments below — I reply to everyone! #cognizantsdesheet #geeksforgeeks #stringproblem #smallestandlargestword #pythonprogramming #dsa #interviewprep #placementprep #csestudent #pythonforbeginners

Download

0 formats

No download links available.

Smallest and Largest Word in a String | Python Solution | Cognizant SDE Sheet GFG | NatokHD