Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8120115
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T05:01:10+00:00 2026-06-06T05:01:10+00:00

this is my first question on stack overflow. Some quick background, this is not

  • 0

this is my first question on stack overflow. Some quick background, this is not for a school project, just for fun and practice and learning. I’m trying to make a spell checker in C. The problem I’m having is coming up with possible words to replace a misspelled word.

I should also point at that in my courses we haven’t gotten to higher level programming concepts like time complexity or algorithm development. I say that because I have a feeling there are names for the concepts I’m really asking about, I just haven’t heard of them yet.

In other similar posts here most people suggest using the levenshtein distance or traversing patricia trees; would it be a problem to just compare substrings? The (very much inefficient) algorithm I’ve come up with is:

compare the first N characters, where N = length of the misspelled word - 1, to dictionary words (they would be read from a system file into a dynamically allocated array)

if N characters from the misspelled word and a word from a dictionary match, add it to a list of suggestions; if no more matches are found, decrement N

continue until 10 suggestions are found or N = 0

It feels clunky and awkward, but it’s sort of how our textbook suggests approaching this. I’ve read wiki articles on traversing trees and calculating all kinds of interesting things for efficiency and accuracy, but they’re over my head at this point. Any help is appreciated, and thank you for taking the time to read this.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-06T05:01:13+00:00Added an answer on June 6, 2026 at 5:01 am

    Modern computers are fast, really fast. It would be worthwhile for you to code this up using the algorithm you describe, and see how well it works for you on your machine with your dictionary. If it works acceptably well, then great! Otherwise, you can try to optimise it by choosing a better algorithm.

    All the fancy algorithms you read about have one or both of the following goals:

    • Speed up the spell checking
    • Offer better suggestions for corrections

    But that’s only important if you’re seriously concerned about performance. There’s nothing wrong with writing your own code to do this. It may not be great, but you’ll learn a lot more than jumping in and implementing an algorithm you don’t understand yet.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

this is my first question on stack overflow but I have some experience in
this is my first question on Stack Overflow. This is not really a programming
( Preface: This is my first audio-related question on Stack Overflow, so I'll try
First off - hello, this is my first Stack Overflow question so I'll try
this is my first question on stack overflow, so be gentle. Let me first
This is my first question here on stack overflow. i need help on a
This is my first stack overflow quesiton, so if i'm not posting correctly, or
this is my first question here at Stack Overflow. I've been looking for a
This is the first time i'm asking a question here at stack overflow so
This is my first question on stackoverflow. I just wonder why my getJSON code

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.