Ask Question, Ask an Expert

+61-413 786 465

info@mywordsolution.com

Ask Computer Engineering Expert

Assignment

Note: Provide optimized solutions in Python and discuss the approach used to solve the problems so that I can understand the approach when I walk through the code

1. A file contain 10 ip's of the different machine.

Write a python program where a function will telnet with this different machine and find the memory usage of a process in that machine.
funct(filename, process x)

2. Given a file (which can be considered as a String with comma delimiter for the complexity of the question) of usernames and a value k, find top k usernames (with number of logins) who logged into the system the most.

For example -

Input:

User (String) = user1, user4, user2, user1, user3, user1, user2, user3
k (int) = 2
Output:
user1 (3)
user2 (2)
user3 (2)

3. Write a Python Program to access a text file and determine the IP addresses that are available in the file :

Eg: Text File contents:

Akcnklasncklnaskckasc 192.168.1.1 asckjasscjasjkc

4. Write code to sum 2 integer but u cant use a+b method, you have to use either ++ or --. How you will handle negative numbers.

5. There are several words in a file. Get the occurrence of every word and sort it based on the occurrence, if more than one word is having same occurrence than sort it alphabetically. Solution Hint: Use Hash Map

6. given a string determine which character appears the most and the number of times that character appeared.

7. WAP fibonoccaci series using recursion and after completion asked to to write using iteration.

8. given 2 arrays wrds[] , chars[] as an input to a function such that
wrds[] = [ "abc" , "baa" , "caan" , "an" , "banc" ]
chars[] = [ "a" , "a" , "n" , "c" , "b"]

Function should return the longest word from words[] which can be constructed from the chars in chars[] array.
for above example - "caan" , "banc" should be returned

Note: Once a character in chars[] array is used, it cant be used again.
eg: words[] = [ "aat" ]
characters[] = [ "a" , "t" ]
then word "aat" can't be constructed, since we've only 1 "a" in chars[].

9. Imagine we have a large string like this "ABCBAHELLOHOWRACECARAREYOUIAMAIDOINGGOOD" which contains multiple palindromes within it, like ABCBA, RACECAR, ARA, IAMAI etc... Now write a method which will accept this large string and return the largest palindrome from this string. If there are two palindromes which are of same size, it would be sufficient to just return any one of them.'

10. Write code to search and return all those file names present in a given directory (for e.g. C:\>) where the string "Amazon" is present. All the files will be located at different folder levels. Also discuss your approach, time and space complexities for your solution.

Computer Engineering, Engineering

  • Category:- Computer Engineering
  • Reference No.:- M92722700

Have any Question?


Related Questions in Computer Engineering

Part 1 if false change the incorrect parts to make them

Part 1, If false, change the incorrect parts to make them true. DO NOT NEGATE THE FALSE SENTENCES. 1. According to the weak-form efficient market hypothesis, investors can take advantage of historical information. 2. The ...

Question reversing the elements of an array involves

Question : Reversing the elements of an array involves swapping the corresponding elements of the array: the first with the last, the second with the next to the last, and so on, all the way to the middle of the array. G ...

How to design a java program that reads a sentence say s

How to design a Java program that reads a sentence, say s, consisting of lower-case words with .nextLine() method, identifies the words using .indexOf() and .substring() methods and saves them in String variables. Then t ...

1 what is the purpose of exclusive gates such as the xor

1. What is the purpose of exclusive gates such as the XOR and XNOR? 2. What function do these gates perform?

Question shuffling a linked list design a divide and

Question : Shuffling a linked list. Design a divide and conquer algorithm that randomly shuffles a linked list in O(nlog(n)) time and logarithmic extra space. The response must be typed, single spaced, must be in times n ...

Suppose a program has a button with the caption quit

Suppose a program has a button with the caption "Quit" Suppose also that Name property of this button is btnQuit. Write a btnQuit_Click event precede that gives the user a second chance before ending the program. The prt ...

Question list and describe 3 strategies organizations can

Question: List and describe (3) strategies organizations can employ for enhancing the customer experience. Select from Amazon, Walmart, or Google and explain how the company SHOULD use these strategies giving specific ex ...

A swimmer is an athlete any athlete who participated in the

A swimmer is an athlete. Any athlete, who participated in the 2016 Summer Olympics and won a gold medal, was joyful. Any athlete, who is the world top athlete or a selected well-trained athlete, participated in the 2016 ...

A scavenger hunt question from the assigned

A scavenger hunt question from the assigned readings.) Consider the statement if ((a! = null)&&(a.x()))a.y(); What feature of the a && b makes it classify as a control structure? Rewrite this as 2 nested if statements. W ...

Question when you supervisor arrives she has a document

Question : When you supervisor arrives, she has a document with her for you to sign, indicating the condition of the computer, how you kept it secure while you waited for her, and the transfer of responsibility for the c ...

  • 4,153,160 Questions Asked
  • 13,132 Experts
  • 2,558,936 Questions Answered

Ask Experts for help!!

Looking for Assignment Help?

Start excelling in your Courses, Get help with Assignment

Write us your full requirement for evaluation and you will receive response within 20 minutes turnaround time.

Ask Now Help with Problems, Get a Best Answer

Why might a bank avoid the use of interest rate swaps even

Why might a bank avoid the use of interest rate swaps, even when the institution is exposed to significant interest rate

Describe the difference between zero coupon bonds and

Describe the difference between zero coupon bonds and coupon bonds. Under what conditions will a coupon bond sell at a p

Compute the present value of an annuity of 880 per year

Compute the present value of an annuity of $ 880 per year for 16 years, given a discount rate of 6 percent per annum. As

Compute the present value of an 1150 payment made in ten

Compute the present value of an $1,150 payment made in ten years when the discount rate is 12 percent. (Do not round int

Compute the present value of an annuity of 699 per year

Compute the present value of an annuity of $ 699 per year for 19 years, given a discount rate of 6 percent per annum. As