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: 100% (QA)
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:...
-
Suppose that GARCH(1,1) parameters have been estimated as = 0.000003, = 0.04, and = 0.94. The current daily volatility is estimated to be 1%. Estimate the daily volatility in 30 days.
-
Discuss how a manager might make sure that the performance plan for each of her direct reports was driven by organizational strategy and the business plan. How can information systems support this...
-
The improper payments made by APC occurred during the time frame that Andrea Jung served as Avon's CEO. Was she "responsible" for those payments even if she was unaware of them? Why or why not?
-
Critical values for quick reference during this activity. Confidence level Critical value 0.90 z* = 1.645 0.95 z* = 1.960 0.99 z* = 2.576 469062.3288744.qx3zqy7 Jump to level 1 A poll for a statewide...
-
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.
-
Without doing detailed calculations, explain which of the following has the greatest mass percent of sulfur: SO 2 , S 2 Cl 2 , Na 2 S, Na 2 S 2 O 3 , or CH 3 CH 2 SH.
-
Consider two similar stocks, S1 and S2. Both have averaged 10% annual return, and their risks in terms of standard deviations (STD) are also the same at 20%. The correlation coefficient between the...
-
You have been asked by the financial controller, Walid Hossain, of Potter Ltd. to carry out an investigation of a suspected fraud by the companys cashier. The cashier, Alfred Blyton, has left the...
-
Based on the background information, what are the major inherent risks for the financial statements and at the account level in the Securimax audit? Consider both industry and entity risks in your...
-
Calculate the enthalpy and entropy departure for water at 400C and 30 MPa using generalized correlations. Compare these values to those in the steam tables. The ideal heat capacity of steam is useful...
-
Over the 20-year period (19972016), U.S. stocks have averaged 7.7% in annual return, with an STD risk of 15.3%. During the same period, U.S. bonds have averaged 5.3% in annual return, with an SD risk...
-
The nondimensional form for the transient heat conduction in an insulated rod (Eq. 30.1) can be written as 2 u / x 2 = u / t where nondimensional space, time, and temperature are defined as x = x /...
-
The Thomas Corporation was organized on Jan. 1, 2020. On Dec. 31, 2021, the corporation lost most of its inventory in a warehouse fire before the year-end count of inventory was to take place. just...
-
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?
-
Use Gauss-Jordan elimination process to solve the following system of linear equations. 6x-2y=4 -12x+4y=-8 18x-6y 12 Infi
-
A college administrator claims that the proportion of students that are nursing majors is less than 40%. To test this claim, a group of 400 students are randomly selected and its determined that 149...
-
A company declared cash dividends of $0.20 per share. If there are 500,000 shares of common stock authorized, 100,000 shares issued, and 80,000 shares outstanding at the date of declaration, what is...
Study smarter with the SolutionInn App