In given two strings A and B, find whether any anagram of string A is a sub
Question:
In given two strings A and B, find whether any anagram of string A is a sub string of string B.
For eg: If A = xyz and B = afdgzyxksldfm then the program should return true.
Fantastic news! We've Found the answer you've been seeking!
Step by Step Answer:
Answer rating: 66% (3 reviews)
from collections import Counter def isanagramsubstringA B lenA lenA lenB lenB if lenA ...View the full answer
Answered By
ANDREW KIPRUTO
Academic Writing Expert
I have over 7 years of research and application experience. I am trained and licensed to provide expertise in IT information, computer sciences related topics and other units like chemistry, Business, law, biology, biochemistry, and genetics. I'm a network and IT admin with +8 years of experience in all kind of environments.
I can help you in the following areas:
Networking
- Ethernet, Wireless Airmax and 802.11, fiber networks on GPON/GEPON and WDM
- Protocols and IP Services: VLANs, LACP, ACLs, VPNs, OSPF, BGP, RADIUS, PPPoE, DNS, Proxies, SNMP
- Vendors: MikroTik, Ubiquiti, Cisco, Juniper, HP, Dell, DrayTek, SMC, Zyxel, Furukawa Electric, and many more
- Monitoring Systems: PRTG, Zabbix, Whatsup Gold, TheDude, RRDtoo
Always available for new projects! Contact me for any inquiries
4.30+
1+ Reviews
10+ Question Solved
Related Book For
Problems Solving In Data Structures And Algorithms Using C++
ISBN: 9789356273177
2nd Edition
Authors: Hemant Jain
Question Posted:
Students also viewed these Computer science questions
-
can someone solve this Modern workstations typically have memory systems that incorporate two or three levels of caching. Explain why they are designed like this. [4 marks] In order to investigate...
-
Portray in words what transforms you would have to make to your execution to some degree (a) to accomplish this and remark on the benefits and detriments of this thought.You are approached to compose...
-
Let A, B be sets. Define: (a) the Cartesian product (A B) (b) the set of relations R between A and B (c) the identity relation A on the set A [3 marks] Suppose S, T are relations between A and B, and...
-
Your company has just been names in as a defendant in a lawsuit because of an accident. The plaintiff is suing for $400,000 in damages. You have contacted legal counsel and the attorneys have advised...
-
1. Will a price below the equilibrium price result in a market surplus or shortage? 2. Find the market equilibrium point for the following demand and supply functions? Demand: p = - 2q + 320 Supply:...
-
The 25-lb block has an initial speed of v 0 = 10 ft/s when it is midway between springs A and B. After striking spring B, it rebounds and slides across the horizontal plane toward spring A, and...
-
If a '5 for 3' rights issue is made at 1.90 per share, how much would a shareholder who owns 15,000 shares pay to the company to buy all the shares he is entitled to? a. 28,500 b. 17,100 c. 47,500 d....
-
Gray, Inc., a private foundation, reports the following items of income and deductions. Gray is not an exempt operating foundation, and it is not eligible for the 1% tax rate. Interest income $...
-
(a) Find the differential dy. dy= y = tan x (b) Evaluate dy for the given values of x and dx. x=/4 and dx = 0.01 dy =
-
In given string, find whether it contains any permutation of another string. For example, given "abcdefgh" and "ba", the function should return true, because "abcdefgh" has substring "ab", which is a...
-
In given three string str1, str2 and str3. Write a complement function to find the smallest sub-sequence in str1 which contains all the characters in str2 and but not those in str3.
-
The Criminal Investigation Divisions chief responsibility is to: a. Detect taxpayers who willfully and intentionally violate their known legal duty of voluntarily filing an income tax return. b....
-
Anything for which a separate measurement of costs is desired is known as Question 1 options: a fixed cost item. a cost driver. a cost item. a cost object. a variable cost object. Question 2 (1...
-
Which one of the following items is typically an example of an indirect cost of a cost object? Question 6 options: courier charges for shipment delivery wood used for furniture manufacture refundable...
-
Wages paid to machine operators on an assembly line are an example of which type of cost? Question 11 options: indirect material costs indirect manufacturing overhead costs direct manufacturing...
-
Anything for which a separate measurement of costs is desired is known as Question 1 options: a fixed cost item. a cost object. a cost driver. a cost item. a variable cost object. Question 2 (1...
-
Which one of the following items is typically an example of an indirect cost of a cost object? Question 6 options: refundable sales tax on direct materials manufacturing plant electricity direct...
-
Kyle Corporation is comparing two different capital structures, an all-equity plan (Plan I), and a levered plan (Plan II). Under Plan I, Kyle would have 700,000 shares of stock outstanding. Under...
-
Subprime loans have higher loss rates than many other types of loans. Explain why lenders offer subprime loans. Describe the characteristics of the typical borrower in a subprime consumer loan.
-
If one has a set, S, of n items, where n is even, then the median item in S is the average of the ith and (i + 1)st smallest elements in S, where i = n/2. Describe an efficient algorithm for...
-
Without using calculus (as in the previous exercise), show that, if n is a power of 2 greater than 1, then, for H n , the nth harmonic number, H n 1 + H n/2 Use this fact to conclude that Hn 1 +...
-
What is H 5 , the 5th harmonic number?
-
Required: Following Simplicity Financial and Business Advisory Group Pty Ltd policies and procedures prepare the following: Task 1 Financial statement analysis The client needs a review of financial...
-
SCC Company reported the following for the current year.Net sales$ 57,000Cost of goods sold47, 200Beginning balance in inventory2,900Ending balance in inventory8,960Compute (a) inventory turnover and...
-
You are an assistant financial consultant for Simplicity Financial and Business Advisory Group PtyLtd, and you have been notified the client converted their business to a public company PTCG Ltd....
Study smarter with the SolutionInn App