1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Lady_Fox [76]
4 years ago
14

supppose we already have a list called words, containing all the words(i.e., string).Write code that produce a sorted list with

all duplicate words removed. For example, if words ==['hello', 'mother','hello','father','here','i','am','hello'], your code would produce the list ['am','father','hello','here','i','mother'].
Computers and Technology
1 answer:
alexandr402 [8]4 years ago
4 0

Answer:

I will code in Javascript.

<em>//define and initialize both arrays.</em>

var words = ['hello', 'mother','hello','father','here','i','am','hello'];

var sortedList = [];

 

 for ( var i = 0;  i < words.length ; i++ ){  <em>//loop used to go throght the words</em>

   var duplicated = false;  <em>// boolean used for detect duplicates</em>

   for ( var j = i + 1;  j < words.length ; j++ ) {  <em>//loop used to compare with other words</em>

     if( words[i] == words[j] ) {  <em>//if the word is duplicated, duplicated becomes true.</em>

       duplicated = true;

       break;

     }

   }

   if (! duplicated) {  <em>//if at the end of the loop of each word duplicated is false, then the element is pushed into sortedList.</em>

     sortedList.push(words[i]);    

   }

 }

 sortedList.sort(); <em>//when the loop is finished, use the Javascript method to sort an array.</em>

You might be interested in
A keyword search in the library’s databases functions exactly like a regular google web search. true false
TEA [102]
False

The databases' engines only search through content in that server, while web searches (like Google and DuckDuckGo) search across the entire web
5 0
4 years ago
Is it important to study information systems
Reil [10]

Answer:

There is massive importance if you want to study information study.

It can help you understand the data, organize, and process the data, using which we can generate and share information.

Explanation:

It largely depends on your interest and requirement, but a better knowledge or clue about information systems may help analyze the data especially if you want to become a data scientist, machine learning, Artificial intelligence or deep learning, etc.

It can help you understand the data, organize, and process the data, using which we can generate and share information.

A great understanding of information systems may exponentially increase the productivity, growth, performance, and profit of the company.

Most Professions get exposed to information Systems no matter what their career objective is, as it may help in having better decision making based on the information they get through data.

So, yes!

There is a massive importance if you want to study information study.

3 0
3 years ago
_______ refers to physical computer equipment, such as the computer monitor, central processing unit, or keyboard.
lesya692 [45]
The Hardware refers to the physical computer equipment, such as the monitor, keyboard, mouse etc.
5 0
3 years ago
A Broad Cost Leader maintains a presence in what segments?Group of answer choices
Andrew [12]

es el incisob amigo o amiga

4 0
4 years ago
Icon view, list view, and details view are all common views provided by which kind of program?
RideAnS [48]
The standard program that uses common views such as the icon view, list view, and details view would be the program known as "File Explorer" (Windows) or "Finder" (Mac). This program uses all the views to make selecting and tracking down certain files a much more painless and easier process to complete.

Hope this helps and good luck! :)
6 0
4 years ago
Read 2 more answers
Other questions:
  • What command would you use to make a secure shell connection to the ubuntu client machine? ()?
    9·1 answer
  • Which tab will you use to format data in cells?
    9·1 answer
  • What is the most recognized and widely used database of published nursing practice literature?
    15·1 answer
  • Which is a type of display monitor? HDD CPU SSD LCD
    6·1 answer
  • A security utility program that scans the system for small programs that interfere with how a computer functions are _____ utili
    13·1 answer
  • 2. Assuming that the bits in an integer are numbered from 0, from right (least significant) to left (most significant), write an
    15·1 answer
  • Someone, please answer this.
    15·1 answer
  • Write a program that reads in an integer, and breaks it into a sequence of individual digits. Display each digit on a separate l
    14·1 answer
  • Logan has developed an excellent presentation with interesting content. He received great feedback on the evaluation
    10·1 answer
  • What is the difference between a crosstab query and a subquery?
    11·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!