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 6783875
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T16:55:25+00:00 2026-05-26T16:55:25+00:00

I have a dictionary in an unknown language. I have to find all the

  • 0

I have a dictionary in an unknown language. I have to find all the characters of this unknown language and lexicographical relation between them. What can be the most efficient way to do this ?

Note :
1. There might be characters starting by which there is no word present in dictionary
2. You can’t assume that the ascii value of characters will be in sorted order
3. There might be some characters among which you can’t find any relation

e.g.

assume that someone don’t know english and our dictionary is:

B
GA
GAS
GBS
GK
SG

Then the solution will be:

 A < B < G < S
 A < B < K
  • 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-05-26T16:55:26+00:00Added an answer on May 26, 2026 at 4:55 pm

    I suggest you linear solution. O(|all strings in dictionary| + |alphabet|). |s| – length of s

    1. Make graph G(V,E). V – characters in alphabet, E = {v1, v2} where v1 less than v2.
    2. Scan dictionary, compare 2 sequence words and add relationship information to graph.
    3. Use topological sort to get characters in the correct order. Complexity – O(|V|) = O(|alphabet|)
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a dictionary of unknown depth and structure. It might contain more dictionaries,
I have a dictionary, user_dict, and create a list for each user value, this
i have this dictionary: a) 2012 UN NEWNW = ( 2012/06/04 Saudi Arabia Huge
I have dictionary Dictionary<string, Point> the Key is c1,c3,c2,t1,,t4,t2 I want to sort them
Suppose I have Dictionary like this: Dictionary<string, string> values = new Dictionary<string, string>() {
I have Dictionary<long, Location> PostalCodes . While i m adding new elements to this
I have a dictionary: dict = {key:[None, item 2, item 3]} How can I
Can I use an Array of Dictionary objects? I have an XML which I
I have Dictionary<Guid, DateTime> d = new Dictionary<Guid, DateTime>(); How I can get an
Have Dictionary <Int64, byte> that gets used a lot. I mean in a loop

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.