{"id":434,"date":"2017-07-07T02:23:41","date_gmt":"2017-07-07T02:23:41","guid":{"rendered":"http:\/\/kaizen-koka.com\/?p=434"},"modified":"2017-07-07T15:14:25","modified_gmt":"2017-07-07T15:14:25","slug":"core-java-assignment-9-complex","status":"publish","type":"post","link":"https:\/\/kaizen-koka.com\/?p=434","title":{"rendered":"Core Java Assignment 9 &#8211; Complex"},"content":{"rendered":"<p>\n\t<span style=\"font-size:14px;\"><span style=\"font-family:tahoma,geneva,sans-serif;\">1) Given the daily stock prices of a share during last 30 days, write a program to find out best buying and selling dates for maximum gain.<\/span><\/span>\n<\/p>\n<p>\n\t<span style=\"font-size:14px;\"><span style=\"font-family:tahoma,geneva,sans-serif;\">&nbsp;for ex: index 0 &nbsp; 1 &nbsp;2 &nbsp;3 &nbsp;4 &nbsp;5 &nbsp;6<br \/>\n\t&nbsp;int[] array= {10,05,04,12,32,04,35};<br \/>\n\tin this case, buying at index 5 and selling at index 6, would give you the max price gain of 31(35-04)<\/span><\/span>\n<\/p>\n<p>\n\t<span style=\"font-size:14px;\"><span style=\"font-family:tahoma,geneva,sans-serif;\">2) In an Array &#8211; Find an element which appeared most.<\/span><\/span>\n<\/p>\n<p>\n\t<span style=\"font-size:14px;\"><span style=\"font-family:tahoma,geneva,sans-serif;\">for Ex: int array[] = {6,4,5,7,3,6,4,7,6,2,9,6}<br \/>\n\t&nbsp; in this 6 is the most appeared number and appeared 4 times.<\/span><\/span>\n<\/p>\n<p>\n\t<span style=\"font-size:14px;\"><span style=\"font-family:tahoma,geneva,sans-serif;\">3)Find Duplicate Characters in a String &nbsp;<\/span><\/span>\n<\/p>\n<p>\n\t<span style=\"font-size:14px;\"><span style=\"font-family:tahoma,geneva,sans-serif;\">for ex:&nbsp;<br \/>\n\t&nbsp;If you enter &#39;Repeated&#39; output should be<br \/>\n\t&nbsp; e &#8211; 3 times<br \/>\n\t&nbsp;If you enter &#39;Ramsamkamdamyumnum&#39;<br \/>\n\t&nbsp; &nbsp;a -4 times<br \/>\n\t&nbsp; &nbsp;m &#8211; 6&nbsp;<br \/>\n\t&nbsp; &nbsp;u &#8211; 2<\/span><\/span>\n<\/p>\n<p>\n\t<span style=\"font-size:14px;\"><span style=\"font-family:tahoma,geneva,sans-serif;\">4) Write a program to simulate a deadlock <\/span><\/span><span style=\"font-size:14px;\"><span style=\"font-family:tahoma,geneva,sans-serif;\">situation?<\/span><\/span>\n<\/p>\n<p>\n\t<span style=\"font-size:14px;\"><span style=\"font-family:tahoma,geneva,sans-serif;\">5) <\/span><\/span><span style=\"font-size:14px;\"><span style=\"font-family:tahoma,geneva,sans-serif;\">Print<\/span><\/span><span style=\"font-size:14px;\"><span style=\"font-family:tahoma,geneva,sans-serif;\"> first non-repeated character in <\/span><\/span><span style=\"font-size:14px;\"><span style=\"font-family:tahoma,geneva,sans-serif;\">String?<\/span><\/span>\n<\/p>\n<p>\n\t<span style=\"font-size:14px;\"><span style=\"font-family:tahoma,geneva,sans-serif;\">6) Write a program to <\/span><\/span><span style=\"font-family:tahoma,geneva,sans-serif;\"><span style=\"font-size:14px;\">find&nbsp;<\/span><\/span><span style=\"font-size:14px;\"><span style=\"font-family:tahoma,geneva,sans-serif;\">a number<\/span><span style=\"font-family:tahoma,geneva,sans-serif;\"> of vowels and <\/span><span style=\"font-family:tahoma,geneva,sans-serif;\">consonents<\/span><span style=\"font-family:tahoma,geneva,sans-serif;\"> in a String?<br \/>\n\t7) Find duplicates in an array if there is more than one duplicate?<\/span><\/span><\/p>\n","protected":false},"excerpt":{"rendered":"<p>1) Given the daily stock prices of a share during last 30 days, write a program to find out best buying and selling dates for maximum gain. &nbsp;for ex: index [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","enabled":false},"version":2}},"categories":[8,3],"tags":[],"class_list":["post-434","post","type-post","status-publish","format-standard","hentry","category-assignments","category-java"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p70lnf-70","jetpack-related-posts":[],"_links":{"self":[{"href":"https:\/\/kaizen-koka.com\/index.php?rest_route=\/wp\/v2\/posts\/434","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/kaizen-koka.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/kaizen-koka.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/kaizen-koka.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/kaizen-koka.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=434"}],"version-history":[{"count":1,"href":"https:\/\/kaizen-koka.com\/index.php?rest_route=\/wp\/v2\/posts\/434\/revisions"}],"predecessor-version":[{"id":435,"href":"https:\/\/kaizen-koka.com\/index.php?rest_route=\/wp\/v2\/posts\/434\/revisions\/435"}],"wp:attachment":[{"href":"https:\/\/kaizen-koka.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=434"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/kaizen-koka.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=434"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/kaizen-koka.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=434"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}