Skip to content
geeksforgeeks
  • Tutorials
    • Python
    • Java
    • Data Structures & Algorithms
    • ML & Data Science
    • Interview Corner
    • Programming Languages
    • Web Development
    • CS Subjects
    • DevOps And Linux
    • School Learning
    • Practice Coding Problems
  • Courses
    • DSA to Development
    • Get IBM Certification
    • Newly Launched!
      • Master Django Framework
      • Become AWS Certified
    • For Working Professionals
      • Interview 101: DSA & System Design
      • Data Science Training Program
      • JAVA Backend Development (Live)
      • DevOps Engineering (LIVE)
      • Data Structures & Algorithms in Python
    • For Students
      • Placement Preparation Course
      • Data Science (Live)
      • Data Structure & Algorithm-Self Paced (C++/JAVA)
      • Master Competitive Programming (Live)
      • Full Stack Development with React & Node JS (Live)
    • Full Stack Development
    • Data Science Program
    • All Courses
  • DSA
  • Algorithms
  • Analysis of Algorithms
  • Sorting
  • Searching
  • Greedy
  • Recursion
  • Backtracking
  • Dynamic Programming
  • Divide and Conquer
  • Geometric Algorithms
  • Mathematical Algorithms
  • Pattern Searching
  • Bitwise Algorithms
  • Branch & Bound
  • Randomized Algorithms
Open In App
Next Article:
Netflix Interview Experience
Next article icon

Netflix Interview Experience

Last Updated : 30 Jun, 2021
Comments
Improve
Suggest changes
Like Article
Like
Report

Question: Split the text file into list of messages

A file that contains English sentences. Sentences(of course) separated by the period "." character.

Write a function that takes this file as an input and returns multiple SMS(140 char) messages. Also, append (1/n) at the end of each message.

Condition 1: please do NOT have a message with split words(split sentences are ok)

Condition 2: Please do this with 1 pass of the file (no char should be read twice from the file)

Condition 3: File is small enough to load into memory.

Example 1:

Input text file content:

Articles is a piece of writing and is produced either in a printed or electronic form, in newspaper, magazine, journal or website. It has a large readership in mind. It is based on surveys, research, facts and analysis etc. Articles may be short or slightly long may be upto 1500 words. It is written with a definite objective and informs the readers about some concept.

Output:

Articles is a piece of writing and is produced either in a printed or electronic form, in newspaper, magazine, journal or website. It(1/3) has a large readership in mind. It is based on surveys, research, facts and analysis etc. Articles may be short or slightly long may be(2/3) up to 1500 words. It is written with a definite objective and informs the readers about some concept. (3/3)

Example 2:

Input text file content:

Essay is formal and comprehensive piece of literature that describes a particular issue or topic analysed and discussed. It refers to a short piece of writing on a particular subject. Mainly students in their academics are asked to write essays on some topics as a response to a question or proposition. It does not have a specific readership in mind. Through essays, writer or narrator expresses his or her personal views or opinion on a particular topic or a question, and it is based on an educational and analytical tone. Let’s take an example and understand what is essay clearly suppose a school student has its exam and in question paper, he has been asked to write something explaining about Floods in India which is an example of essay.

Output:

Essay is formal and comprehensive piece of literature which describes to a particular issue or topic analysed and discussed. It refers(1/6) to a short piece of writing on a particular subject. Mainly students in their academics are asked to write essays on some topics as a(2/6) response to a question or proposition. It does not have a specific readership in mind. Through essays writer or narrator expresses his(3/6) or her personal views or opinion on a particular topic or a question and it is based on educational and analytical tone. Let’s take an(4/6) example and understand what is essay clearly suppose a school student has its exam and in question paper it has been asked to write(5/6) something explaining about Floods in India which is an example of essay. (6/6)


Next Article
Netflix Interview Experience
https://media.geeksforgeeks.org/auth/avatar.png
Anonymous
Improve
Article Tags :
  • Interview Experiences
  • Algorithms
  • DSA
  • Experiences
  • Netflix
Practice Tags :
  • Algorithms

Similar Reads

    Tesla Interview Experience
    Round-1:This round focused on aligning my skills and experience with the role and team at Tesla. It involved an in-depth discussion about the position, how my past experiences relate to it, and my perspective contributions. We delved into my career goals, the broader context of current projects, and
    2 min read
    ServiceNow Interview Experience
    In November 2020, I embarked on an enriching journey by becoming a part of the ServiceNow team. The interview process that led me to this exceptional company was a true testament to their commitment to excellence in technology and nurturing top talent. Application and Shortlisting I was delighted to
    2 min read
    Google Interview Experience | Set 6
    It was a nice experience to be part of google placement programme. There were 4 Rounds The online test consists of 4 modules. For each module, a timer is set (at the right-hand side bottom of the screen). Total time given is 40 minutes. Module 1: English (duration 5 min): It consists of a single pas
    1 min read
    Netflix Interview Experience for Content Manager
    Hello everyone! I wanted to share my interview experience with Netflix for the role of Content Manager. and the entire process consisted of multiple rounds, making it an exciting and insightful journey. Round 1: Initial Screening The first round was an initial screening conducted over the phone with
    3 min read
    Amazon Interview Experience | SDE-2
    Round 1: Implement Find command in Linux. Asked to review a piece of code that was already written. Some behavioral questions Round 2: Assembly Line Scheduling Connect n ropes with minimum cost Round 3: Design stack overflow along with its Notification system. Round 4: Complete discussion on the cur
    1 min read
geeksforgeeks-footer-logo
Corporate & Communications Address:
A-143, 7th Floor, Sovereign Corporate Tower, Sector- 136, Noida, Uttar Pradesh (201305)
Registered Address:
K 061, Tower K, Gulshan Vivante Apartment, Sector 137, Noida, Gautam Buddh Nagar, Uttar Pradesh, 201305
GFG App on Play Store GFG App on App Store
Advertise with us
  • Company
  • About Us
  • Legal
  • Privacy Policy
  • In Media
  • Contact Us
  • Advertise with us
  • GFG Corporate Solution
  • Placement Training Program
  • Languages
  • Python
  • Java
  • C++
  • PHP
  • GoLang
  • SQL
  • R Language
  • Android Tutorial
  • Tutorials Archive
  • DSA
  • Data Structures
  • Algorithms
  • DSA for Beginners
  • Basic DSA Problems
  • DSA Roadmap
  • Top 100 DSA Interview Problems
  • DSA Roadmap by Sandeep Jain
  • All Cheat Sheets
  • Data Science & ML
  • Data Science With Python
  • Data Science For Beginner
  • Machine Learning
  • ML Maths
  • Data Visualisation
  • Pandas
  • NumPy
  • NLP
  • Deep Learning
  • Web Technologies
  • HTML
  • CSS
  • JavaScript
  • TypeScript
  • ReactJS
  • NextJS
  • Bootstrap
  • Web Design
  • Python Tutorial
  • Python Programming Examples
  • Python Projects
  • Python Tkinter
  • Python Web Scraping
  • OpenCV Tutorial
  • Python Interview Question
  • Django
  • Computer Science
  • Operating Systems
  • Computer Network
  • Database Management System
  • Software Engineering
  • Digital Logic Design
  • Engineering Maths
  • Software Development
  • Software Testing
  • DevOps
  • Git
  • Linux
  • AWS
  • Docker
  • Kubernetes
  • Azure
  • GCP
  • DevOps Roadmap
  • System Design
  • High Level Design
  • Low Level Design
  • UML Diagrams
  • Interview Guide
  • Design Patterns
  • OOAD
  • System Design Bootcamp
  • Interview Questions
  • Inteview Preparation
  • Competitive Programming
  • Top DS or Algo for CP
  • Company-Wise Recruitment Process
  • Company-Wise Preparation
  • Aptitude Preparation
  • Puzzles
  • School Subjects
  • Mathematics
  • Physics
  • Chemistry
  • Biology
  • Social Science
  • English Grammar
  • Commerce
  • World GK
  • GeeksforGeeks Videos
  • DSA
  • Python
  • Java
  • C++
  • Web Development
  • Data Science
  • CS Subjects
@GeeksforGeeks, Sanchhaya Education Private Limited, All rights reserved
We use cookies to ensure you have the best browsing experience on our website. By using our site, you acknowledge that you have read and understood our Cookie Policy & Privacy Policy
Lightbox
Improvement
Suggest Changes
Help us improve. Share your suggestions to enhance the article. Contribute your expertise and make a difference in the GeeksforGeeks portal.
geeksforgeeks-suggest-icon
Create Improvement
Enhance the article with your expertise. Contribute to the GeeksforGeeks community and help create better learning resources for all.
geeksforgeeks-improvement-icon
Suggest Changes
min 4 words, max Words Limit:1000

Thank You!

Your suggestions are valuable to us.

What kind of Experience do you want to share?

Interview Experiences
Admission Experiences
Career Journeys
Work Experiences
Campus Experiences
Competitive Exam Experiences