DatasetRepo commited on
Commit
1c27b01
·
verified ·
1 Parent(s): 690fee2

b55df0184d27544bfbb29ce9da3fe89617b7aaecab49b5ae05ffcd8cfbc4f6a9

Browse files
This view is limited to 50 files because it contains too many changes.   See raw diff
Files changed (50) hide show
  1. .gitattributes +5 -0
  2. maximum_count_of_positive_integer_and_negative_integer/meta.json +0 -0
  3. maximum_count_of_positive_integer_and_negative_integer/ocaml_tests/main.ml +29 -0
  4. maximum_count_of_positive_integer_and_negative_integer/scala_tests/MySuite.scala +16 -0
  5. maximum_deletions_on_a_string/.DS_Store +0 -0
  6. maximum_deletions_on_a_string/haskell_tests/Main.hs +27 -0
  7. maximum_deletions_on_a_string/java_tests/Main.java +25 -0
  8. maximum_deletions_on_a_string/meta.json +72 -0
  9. maximum_deletions_on_a_string/ocaml_tests/main.ml +29 -0
  10. maximum_deletions_on_a_string/scala_tests/MySuite.scala +16 -0
  11. maximum_difference_between_adjacent_elements_in_a_circular_array/haskell_tests/Main.hs +41 -0
  12. maximum_difference_between_adjacent_elements_in_a_circular_array/java_tests/Main.java +20 -0
  13. maximum_difference_between_adjacent_elements_in_a_circular_array/meta.json +340 -0
  14. maximum_difference_between_adjacent_elements_in_a_circular_array/ocaml_tests/main.ml +42 -0
  15. maximum_difference_between_adjacent_elements_in_a_circular_array/scala_tests/MySuite.scala +32 -0
  16. maximum_difference_between_even_and_odd_frequency_i/haskell_tests/Main.hs +41 -0
  17. maximum_difference_between_even_and_odd_frequency_i/java_tests/Main.java +20 -0
  18. maximum_difference_between_even_and_odd_frequency_i/meta.json +47 -0
  19. maximum_difference_between_even_and_odd_frequency_i/ocaml_tests/main.ml +42 -0
  20. maximum_difference_between_even_and_odd_frequency_i/scala_tests/MySuite.scala +32 -0
  21. maximum_difference_between_even_and_odd_frequency_ii/java_tests/Main.java +25 -0
  22. maximum_difference_score_in_a_grid/haskell_tests/Main.hs +3 -0
  23. maximum_difference_score_in_a_grid/java_tests/Main.java +20 -0
  24. maximum_difference_score_in_a_grid/meta.json +3 -0
  25. maximum_difference_score_in_a_grid/ocaml_tests/main.ml +0 -0
  26. maximum_difference_score_in_a_grid/scala_tests/MySuite.scala +0 -0
  27. maximum_elegance_of_a_k_length_subsequence/.DS_Store +0 -0
  28. maximum_elegance_of_a_k_length_subsequence/haskell_tests/Main.hs +27 -0
  29. maximum_elegance_of_a_k_length_subsequence/java_tests/Main.java +25 -0
  30. maximum_elegance_of_a_k_length_subsequence/meta.json +3 -0
  31. maximum_elegance_of_a_k_length_subsequence/ocaml_tests/main.ml +29 -0
  32. maximum_elegance_of_a_k_length_subsequence/scala_tests/MySuite.scala +16 -0
  33. maximum_enemy_forts_that_can_be_captured/.DS_Store +0 -0
  34. maximum_enemy_forts_that_can_be_captured/haskell_tests/Main.hs +24 -0
  35. maximum_enemy_forts_that_can_be_captured/java_tests/Main.java +21 -0
  36. maximum_enemy_forts_that_can_be_captured/meta.json +0 -0
  37. maximum_enemy_forts_that_can_be_captured/ocaml_tests/main.ml +26 -0
  38. maximum_enemy_forts_that_can_be_captured/scala_tests/MySuite.scala +12 -0
  39. maximum_energy_boost_from_two_drinks/haskell_tests/Main.hs +45 -0
  40. maximum_energy_boost_from_two_drinks/java_tests/Main.java +21 -0
  41. maximum_energy_boost_from_two_drinks/meta.json +1429 -0
  42. maximum_energy_boost_from_two_drinks/ocaml_tests/main.ml +50 -0
  43. maximum_energy_boost_from_two_drinks/scala_tests/MySuite.scala +44 -0
  44. maximum_frequency_after_subarray_operation/haskell_tests/Main.hs +0 -0
  45. maximum_frequency_after_subarray_operation/java_tests/Main.java +21 -0
  46. maximum_frequency_after_subarray_operation/meta.json +3 -0
  47. maximum_frequency_after_subarray_operation/ocaml_tests/main.ml +0 -0
  48. maximum_frequency_after_subarray_operation/scala_tests/MySuite.scala +0 -0
  49. maximum_frequency_of_an_element_after_performing_operations_i/haskell_tests/Main.hs +0 -0
  50. maximum_frequency_of_an_element_after_performing_operations_i/java_tests/Main.java +21 -0
.gitattributes CHANGED
@@ -170,3 +170,8 @@ maximum_beauty_of_an_array_after_applying_operation/meta.json filter=lfs diff=lf
170
  maximum_coins_from_k_consecutive_bags/haskell_tests/Main.hs filter=lfs diff=lfs merge=lfs -text
171
  maximum_coins_from_k_consecutive_bags/meta.json filter=lfs diff=lfs merge=lfs -text
172
  maximum_consecutive_floors_without_special_floors/meta.json filter=lfs diff=lfs merge=lfs -text
 
 
 
 
 
 
170
  maximum_coins_from_k_consecutive_bags/haskell_tests/Main.hs filter=lfs diff=lfs merge=lfs -text
171
  maximum_coins_from_k_consecutive_bags/meta.json filter=lfs diff=lfs merge=lfs -text
172
  maximum_consecutive_floors_without_special_floors/meta.json filter=lfs diff=lfs merge=lfs -text
173
+ maximum_difference_score_in_a_grid/haskell_tests/Main.hs filter=lfs diff=lfs merge=lfs -text
174
+ maximum_difference_score_in_a_grid/meta.json filter=lfs diff=lfs merge=lfs -text
175
+ maximum_elegance_of_a_k_length_subsequence/meta.json filter=lfs diff=lfs merge=lfs -text
176
+ maximum_frequency_after_subarray_operation/meta.json filter=lfs diff=lfs merge=lfs -text
177
+ maximum_frequency_of_an_element_after_performing_operations_i/meta.json filter=lfs diff=lfs merge=lfs -text
maximum_count_of_positive_integer_and_negative_integer/meta.json ADDED
The diff for this file is too large to render. See raw diff
 
maximum_count_of_positive_integer_and_negative_integer/ocaml_tests/main.ml ADDED
@@ -0,0 +1,29 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+ module Main = struct
3
+ open OUnit2
4
+
5
+ (* Program start *)
6
+
7
+ (* Program end *)
8
+
9
+ (* Test cases *)
10
+
11
+ let test1 _ = assert_equal 3 (maximumCount [-2;-1;-1;1;2;3])
12
+
13
+ let test2 _ = assert_equal 3 (maximumCount [-3;-2;-1;0;0;1;2])
14
+
15
+ let test3 _ = assert_equal 4 (maximumCount [5;20;66;1314])
16
+
17
+
18
+ (* Grouping test cases *)
19
+ let suite = "Test Suite for maximumCount" >::: [
20
+
21
+ "test1" >:: test1;
22
+ "test2" >:: test2;
23
+ "test3" >:: test3;
24
+ ]
25
+
26
+
27
+ (* Running the tests *)
28
+ let () = run_test_tt_main suite
29
+ end
maximum_count_of_positive_integer_and_negative_integer/scala_tests/MySuite.scala ADDED
@@ -0,0 +1,16 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+ class MySuite extends munit.FunSuite {
3
+
4
+ test("test1") {
5
+ assertEquals(Main.maximumCount(List(-2,-1,-1,1,2,3)), 3)
6
+ }
7
+
8
+ test("test2") {
9
+ assertEquals(Main.maximumCount(List(-3,-2,-1,0,0,1,2)), 3)
10
+ }
11
+
12
+ test("test3") {
13
+ assertEquals(Main.maximumCount(List(5,20,66,1314)), 4)
14
+ }
15
+
16
+ }
maximum_deletions_on_a_string/.DS_Store ADDED
Binary file (6.15 kB). View file
 
maximum_deletions_on_a_string/haskell_tests/Main.hs ADDED
@@ -0,0 +1,27 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+ module Main where
3
+ import Test.HUnit
4
+
5
+ --Program start
6
+
7
+ --Program end
8
+
9
+ -- Test cases
10
+
11
+ test1 :: Test
12
+ test1 = TestCase (assertEqual "for (deleteString \"abcabcdabc \")," 2 (deleteString "abcabcdabc"))
13
+
14
+ test2 :: Test
15
+ test2 = TestCase (assertEqual "for (deleteString \"aaabaab \")," 4 (deleteString "aaabaab"))
16
+
17
+ test3 :: Test
18
+ test3 = TestCase (assertEqual "for (deleteString \"aaaaa \")," 5 (deleteString "aaaaa"))
19
+
20
+
21
+ -- Grouping test cases
22
+ tests :: Test
23
+ tests = TestList [TestLabel "Test1" test1, TestLabel "Test2" test2]
24
+
25
+ -- Running the tests
26
+ main :: IO Counts
27
+ main = runTestTT tests
maximum_deletions_on_a_string/java_tests/Main.java ADDED
@@ -0,0 +1,25 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+ import static org.junit.jupiter.api.Assertions.*;
3
+ import org.junit.jupiter.api.Test;
4
+ import java.util.List;
5
+ import java.util.Arrays;
6
+ import java.util.ArrayList;
7
+ public class Main {
8
+ //Program start
9
+
10
+ //Program end
11
+
12
+ @Test
13
+ public void test1() {
14
+ assertEquals(2, deleteString("abcabcdabc"));
15
+ }
16
+ @Test
17
+ public void test2() {
18
+ assertEquals(4, deleteString("aaabaab"));
19
+ }
20
+ @Test
21
+ public void test3() {
22
+ assertEquals(5, deleteString("aaaaa"));
23
+ }
24
+
25
+ }
maximum_deletions_on_a_string/meta.json ADDED
@@ -0,0 +1,72 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "id": 2510,
3
+ "name": "maximum_deletions_on_a_string",
4
+ "difficulty": "Hard",
5
+ "link": "https://leetcode.com/problems/maximum-deletions-on-a-string/",
6
+ "date": "1664064000000",
7
+ "task_description": "You are given a string `s` consisting of only lowercase English letters. In one operation, you can: Delete **the entire string** `s`, or Delete the **first** `i` letters of `s` if the first `i` letters of `s` are **equal** to the following `i` letters in `s`, for any `i` in the range `1 <= i <= s.length / 2`. For example, if `s = \"ababc\"`, then in one operation, you could delete the first two letters of `s` to get `\"abc\"`, since the first two letters of `s` and the following two letters of `s` are both equal to `\"ab\"`. Return _the **maximum** number of operations needed to delete all of _`s`. **Example 1:** ``` **Input:** s = \"abcabcdabc\" **Output:** 2 **Explanation:** - Delete the first 3 letters (\"abc\") since the next 3 letters are equal. Now, s = \"abcdabc\". - Delete all the letters. We used 2 operations so return 2. It can be proven that 2 is the maximum number of operations needed. Note that in the second operation we cannot delete \"abc\" again because the next occurrence of \"abc\" does not happen in the next 3 letters. ``` **Example 2:** ``` **Input:** s = \"aaabaab\" **Output:** 4 **Explanation:** - Delete the first letter (\"a\") since the next letter is equal. Now, s = \"aabaab\". - Delete the first 3 letters (\"aab\") since the next 3 letters are equal. Now, s = \"aab\". - Delete the first letter (\"a\") since the next letter is equal. Now, s = \"ab\". - Delete all the letters. We used 4 operations so return 4. It can be proven that 4 is the maximum number of operations needed. ``` **Example 3:** ``` **Input:** s = \"aaaaa\" **Output:** 5 **Explanation:** In each operation, we can delete the first letter of s. ``` **Constraints:** `1 <= s.length <= 4000` `s` consists only of lowercase English letters.",
8
+ "public_test_cases": [
9
+ {
10
+ "label": "Example 1",
11
+ "input": "s = \"abcabcdabc\"",
12
+ "output": "2 "
13
+ },
14
+ {
15
+ "label": "Example 2",
16
+ "input": "s = \"aaabaab\"",
17
+ "output": "4 "
18
+ },
19
+ {
20
+ "label": "Example 3",
21
+ "input": "s = \"aaaaa\"",
22
+ "output": "5 "
23
+ }
24
+ ],
25
+ "private_test_cases": [
26
+ {
27
+ "input": "bqqjbbogzidmfheguwtcvefhmqnjdukhyakrcvgfgypknlegykrbfqkcstojdgryefmkjvanzppcyersojxidzojismjiflxsckvcnppbnajhhbcabrwhzpurjaqlupbtwkxslvjhwcrpyrtrsgukpvkmnohaleijuwgfkdlrnzanhvvbgirivfrbgoywdjlrzwkuvuvxqrnyimrjcdyoqtdctvucevvhmwtztiqukexyxdxdgrueemurddtdgwjirpbqhrbgysurghxaeycllpphiusqeifhyblorwqibcgmwbpxdmxjwdrntvxphodwqiajgwjwmfizhtpfanoecunjctwslrnwgwgecmukrumlvmsybarnfzmuwjjeaflmxljycpobawwnnssglxjaxnuqklkqinkschtzlywiahnxodnmyxnowwapucwfyvbrtjjmtiylhjzxlhrfjpxhrfumyunkjsxjfmxhybvoyxfbjuwuqssmfjypnlqntttxninjwszayqaclaudqmnnbtosxeudztzkogewnsanwmutffmrtektnldqdmkvliycfgcdagwdiuhfcadcvfealyoklrdoycwuopozkoavcruelefjsmgkvdmjagmrbwgmsptapskiymcbwquwleucoiinwqchollgnsvwysnieivkatocgfjbdmllhphbeyhgxudqzlbphazyieysqkeekpsvkypagpklkxaarwsgxrxylhdgumpdjxlbvakmtsxpywzktxyrduetqtjnygvptepkwtokvxhjfeeqbpijgcetiiandnssiagfcceozowomnwxccwayedosqaxtiujejbqhmlizawiqcbjggzhnldvzecormelimrgsijdoatyfekpqqgfvbukmimhqgyoxkqdplpdcwnaetipzlmpyhlqfnsvkenngdjtlxbufnndrvxebwieffgayflwshubcftxeqdyinkevjleejzilkcjeumdbyrnysjmnjlkqaruqbcguqssgwzbfkjdjhhdligxeouzmjmhrwuuxymvmppjbhpuywerkhwkxeluxjwytncczpmdkuioqmohmsvuuqywybsovpgvezbhbglycxypuntbpzvlcwwiwnkrddxujlzehiksvqrtwirobmyyefwiwttipicoasyvbjiiihmtadacrxsmxczzzdlhctzedwtoqecwczpboqotraomrwanrmczujcyhrlfslpolouljqdjvvzmslxttrqnnroprmycyzbnsiuswjjvapvnqiolfiksknzditxeeqdbkjdglwktqlnsugbkzlsioiqgrzudixhpqbtelzsoremhqncaqhxuoxqhbqjzznsneshmlfcfcmriwmuqkfpyhwkfzvepydrycxibpmssskiiuresxvdnnmqnfeinhcfwpumzmjxmgzdwzzayuktttqvayfxnopmswjxljsecrlygjhmiskantpnvtatpnqvbqbtjmbnwgxxefzfwajqvbfivlbbvgsedtvjpodagiknbravxfogcflfdgilwgctanfbwmmyjnwyiudxncghgrqgsxlwueehvkvncmiegprgbcshtmtecnlmohguvcmtcvctlxaljmpmrsvmvkotuovhisvziaypeetphpcjsxipsswpbbieiecreynqaygdpeddihkcedqgyhokkutfpedobkbexbxuiotsixqumsmlrtifkbduqtfxtgwkzzlxgyaijedfxzgzoxuunjxukdrmyclvtfcubnhwokefonoqmueotiqbzspcwgnrstdtthtuuqtoclyurzrveqaeifuomjwvnlziduggqdfsmsobjfvajonsverllyoszwrycqbbqritikortsvobcirzyoxntzmexibfsynqimowwbgwijomehnhmbwrrfxtlphvadlsgfbdhxjntsmohbznonkjczwethghdnzdvarqqbkjswwoiiqffznmgbhxhffzoxzdhmiazzfywmvzwodkmeiujhvwywidmtfwlaierwulirfrhaklvmiclqvxsezthgbecttiyjihbhreeesikhabgxpmbvjwjoeshpmufvlrvcmxqfwbzceyjyxggcrmdqquvoescustmnlknpvplwpezsnhdsvlhgoebtwolgqtwxeomszkibccvrqcomkslatdodseqdsjpenbqojesfntwthpkxiqaegpuxerianekwdxhhhlejhovfiyruxmcekjvgquzthmgecynytyvqgamywvwphwovzanksxgoyvlfjszlybckznkaessabxtbolgtfxfldusddefofrynaaslczuztcesgilyojfivxptsevbmosscconfesmutypzscicgexpayptazfugubzuoezqoanqkponygyfzmkltzntstpejnhkqxdaqdtdrwocijasudhbbolujvnbtobomofqnehrhrbpmcueacuesudayyqxrexshagutmwrotibqshyitcjcmhcovfrbyzgklyqhuawovpbpopbuqtigoickfeoayxtvjhadpiowltiknpuppipvvfwvifmwcefrbvstdetutqtcuawkwcrnthrofcekjzlphqdagltikuzwxmokmefwbthjtimwnbtvyouxookegyijlyswdcwbkibxvvgyxknmqxffnunhuubmtuhpdeutumbnzwjjfunxcsymbdkzfxyhkotavnbjmiqcypvvmojlfxawdbizmudybzsvyqtvoabcowuzngnyrxqkydnhjsfmjfzfnjpggbodkkpspteskujdznmqsnuyirolkxsyghruathjsmppaaommehecjriomuwrsaiwpkcgtvzjkuysbgugipyompkobtyhtcjqtmptwmmynahnztvrxqcskzpcrwabiefabvaxrnacqbejswoywbsvlnrwdatmflqizsfzskbuunuelwqnjnwktopzpfrbcectlplewbbupaclzgzyqucwgenzpyioivgthxxwdmyhaopmforhujnhjqlqefbryqfhjibjwpcqnbbuqwkqgamskdvbqctzkaijspcswunepkmhvyhydyamwplxllcvondndetetxszfcjizdqnlkcvrombdkpyiyfiptyrfmebosalcmayrteuklrbkvqedevhtazfvyujrwqrpcnlpilhtgbphmkymqrjfqtjwfcmqhnxxghhbhupjrgrhnjcscifvokktknqwazfvgrojajenxpktfmgjejohfaetrntabmoyclltxivgecnswbrzxfkkwmhttjazavngphoflqhzylptqtbyxlvmjzxabucofxpptvnvurrlsbxoqslchoxdrhdbvouvvbpllaebqeyyllusevmjzholpdyxtkctafcwqjgukimpgznnnwwasuuvluxwdliklwguuojidmfalacpxgttdnydkvcegstpgdvsboscnnohrcovgeshywmja",
28
+ "output": 1
29
+ },
30
+ {
31
+ "input": "rtwphklhjdnzhnpgoqoedqxewynhgecjbvdciewczavkumsrdgwrdqlkvqxpvtxqncgcgvuemjskjednzcgjapsvhwiqqzemnwynvumugjcmzcggkwvejbpehwwmmqoaiamhoybdczavzyuyfmpxbawrygudosbtteinxobbuaiiosdrbgcvaztxzokeftpsgujqayflthtyyxzuhoumlxlvtkhdquyjzegiobslmjowvlaycrqtnitxqfegitsfppywberdsrexuukowckpxuldgtahcdvdunqcghlurkgdpmdcgbotymtvcchvuzludunwbnzjnxoclrqofybgwvogxblnwvzbmdffvkwrshgewlyhsrhjpkyrvafftvenmekrtftvsnedjvmlivktxkqxwuzglxbjlviffjyktpjrpiidklouapbaqbbwuicdsttluabfykhphanmgdgogcqkkkmildnoadgjcnhphvpeygvicgrabetnokrzfrlpdtpitjswgiihzjppstlvaareohshtuogyhxeauwhymxrenucrbeqekylcilzvguulllrmncuvvirygawigjrhcnofrrvsmscfqxadhedwcmuwmojchypbsjfdxaqndcaymlmnrlfzbczfpstnmfauteicfljutyjwinbmfadjksylnlbsfcbaactjboumxkgmwhykltwicyvakjgjodynmrflpdtvfmvtweuciqsmmoobpeyesubgcpbjjscrifrdgoipvubqmqaiszvjcicisqctcdoamtcqpdetrrmzwsdkmhytnlqefdnstuourytfgfuaqiurrrudfckabkyiozkegfagwgueedtcvrprqeizmdsyyokeyfdanwduifzieoahfvnpqvwusvmwhlnxiefwzqphcqkfdyotcwpmetpkavxtquhsrgeboxqzchgdnyczwbcxqtdmrvmdltdqproppvqmkpgpewjlfcdfgsaxjfpnqcpbkqcdmkezeqflyrxowuunyywxwxipkvcqjyhtwvqqazrmzqodtblcznhtxzdofztkeymsdvxogleqzfxwnexqyeouyqpltpnktxqiwcouomlufkrkehkpwywqtwkakstpivaokxujzgajrlxumlbnmnmckyzjrpnmwdjowhzndrzxieuikhbmlorqemyiodcuunsosfwlxounqkcbjaofjpzkzttvvisbwskyjnuhiaeiwjmvczogvxsjguxplpuyjphcdztuvofwxykspcxaxdczukudqhwjyrecsyxbckulbbmlekydfyejqeqdxehwmvhpazgsgybvkdhosjsotpfofxlwqxixrigecdcmxhegxddkutwjimznceybyzaqeigywgkvmqdqiktoytvljlytqsjniuheofbtacnrwsmopecgnouezkceoinniujlvdtqqmmhvbtunkcnsvuestdigtwqvxbcpqqrvljvmqnfpghjbfcmexdzcnawonykxqfoetjaztpwjgfweofoxmzbnwrtjdgfmllbvhrqfhruavynetydblbeutdoziqnkgkxyxunmodbxtjrbegobckfnglulyyglmqwuegnmvcinucnhmaehlhzlsklaklwntpyiaubbcqbibptayuasjhpqfhqpjrskbroyfbwdjbyjbainnxubbifzexbhhqeukeqsqjtejhyjqgpjveelohwuzmenfhchckcodgqsfbvilmlkvusviblouiigfgjqqdefedhuqjipgskafuqpmabirpmdhsscuhqvnejhmmpwlmmwkhqgkbpwvzguxhukajfuzfnwssmutypvkcywklgfjnbanactnmyaswhlychxyapsevolgmsazlkbbimjqwaltkfwbvdmxjsfogflisvebjuooglaedowzhgnxovuirqrkzuzzukqrzfwksqfijcyhkfjvzcormxrnsujjpdsiawvxofndueeatsbrikxedjolfhobtlvckopnbntsgwxrnfzknsuuvfdwbhausknzqewsmqzcaipzpukqokifcointkezhcbgkqyszbfvxfywrywluyhhxucbiewyecymycwgopzlpiavrgqradzauowgcfsbeybcwcgscatvjahrjoqzipxbvaqwmjxac",
32
+ "output": 1
33
+ },
34
+ {
35
+ "input": "qkvqtqeqfwqreoiotirftnghgzxnevhtwwipgqciyqxalsazqzumskdxtyxttfvtpzqfybmnxpintspxmnidvoislzizgxdasdrcrdydgrutkprqzcbityurzdaceoziorgzijxdljncrurylszlijhutijjwczrwynqrrgqbegpzmoyqabkdvnmcfinmihhcapchelevdzslspvvulshuxmdalwyqulzslqfrycgpffhysobjdovjjuamrmnyulhrektxefhpmgpxglcxbdulxoczujeyqiizyslfhatjhxetjzcooaymvtfnkuuaurgdncdymrirrmenmngikystvtfjraapxlwtqauxzfyzeqkrkfsgjyieysdadnlotdejqymwckwinkuzxvruxbqneaoprrigzbygmxfnfgjlnbwfwqxiosysfwtxqnsltseepqnxtkzkvqhjdmmihaqykrdmyqsxrkmyawrrhzufhbuekvavnnilzffddhtpvglewjftnpizcnrjwpieeisokoruvqgrzhgjdbpcdepheiamitnwopuyuftlqhlfrkbjyapgltjzeflcdkbvrlgepzmkyivwyjpxxlsacbtdmzvwnuusgeeyqabaualszvhxirrfojiviielhpnidyziqpxosaxuqsywjolqnpbmgttnghukpjhyfyxnrcnsftxxrspyhlmvuxpkuoxrdtqfnkycvpljlvleeoyblzgkjjjxzgnztizqdxwlvudstgatioqbbjxqtwyyrpexyzikhsibwvzonkcnibdgaaklwtjsaofeyguvslzbmszlmqqjjvniwnofrbewakiqjnbwwprfvwxi",
36
+ "output": 1
37
+ },
38
+ {
39
+ "input": "ocbgvglfpxcbeoguirucxmotkhzrsfnbpghtyzfthnlmvwpubtbjgarmcnutpbzbclutrelxmlyuomyicdhxeqlapttezkyvpakmwjyokcupdynphirlriccgblosotqswfbiapyqzcvkzxatzaacketvvipeavaatbbtbeatydmcztvktqwouwpappkqrwohikoiusvuycfotxpwklygbsgbzefgelupxvsjkansdnstonafayyiuzdhuvawjtrbyrwfokpaflvjxdoxxsrrvwsyklpbnhtlbsrqkyeolhngziojebkeofjrxdzqfzsodppoiikdfndrfvqgcynoblwxuakqpknggpzlotnrhxfvffrcawmjxrwwbthqmbqsqvltbxgitfvxilidpjfrxxxizmraqexucvmfugjqdmcugwljbiwyrczbgcqgcczmvtmomomclptalamtvolqejrdynjmzblsdkcsqxzijoskimarqbpbfvkajkxeduxjrdgsmptsnegpcugsurppiyfglmodvprxmxgzxubwqbvhlnhplhjgolqjdsszjjzqztecteqwpidklsqppqpezrecaapakcwllijeqexsivqgofzhbgnharfxpuugdhbugndpfhktgdbhvytnaunppkaoprjxuztavmsxmdhhpjbfqsqyxwywcdltthwdqnqoucpwyhugxyvkezlywvcmtinacbntwotzoxjvmwnchcvrmlqtkzmuoyliovgovjlybpweeetzpwcjbtbzfropytuuwsgpkobfgukwvluqyqnhtwinutgtrrtxbazanhdhxyoozgkivmldelfmpyxeqnxbcbtchfzbrivarwrdxwoodlsmlcauhjtsuoysdyjaztyunroafzhnheraygggvvezgzoanycdrtdtibqjsfvahnjgomvrosextqohkyvyvtlrrdszeydtjyaoziperfnllvmcvjviyyhdwnxaoqwfqlgazhxobxwzoqaqcxioevjvzdmtcxlfiqprhshtxbpbvctzqrcgyiksdnzryrjkcjdsazojhpejxqnglrukxglipvecohkdthpunzvzculznbqyglgtlgkfijbseaaexmzmyisercljowuupnhxpjciixtxdsgnfjmvrtzmsffxxmsyoyknwbhpeolnkcpcwaztdnsocfdezuwzgeulowunapaeedmqqjlrtavhwdejrzdgiorbidiqwbsiwqhnlmttmfzwuqxfchvmicvrmjdnslvyztdgwseuwawfclnnyfwthsjesuymocnerfjtoktxdvnbmjsawzzweoudxoxjocjittwkeyuhmxgygzbugioorxirhfdvmnfcdguehjirrjirbnankvjzjiqyliyuxiwqclxuzmtcysmzvmzsxlkhtlqntaskpgfegwskqhocupryrkcbreccfmdgdscvzqbupwffluhbdxdxocvlsgjbjrbllfepylrhyjbzwgfspigujdyoesloikwbtsttsdxtqorqhtqirtwtmftrsyjveylngjxwtdzxkkntzrplakgqatwdhfkwdsmcdlxtzjclpivuqyhttddfnhvzsymgykezezifsuqibtlbeaifxiofujygghwiovzfhmhtjrtnrpphijptqvslzmgaetunfcwieideddsaruigiiyoxvqwtkotuyzmwkatxcgvlxsymhjpodxccguhcveprohegqazpfvgjzwkfdwbdwbbrirqmcydomdpbyhogquoutxtljqygfuatojytecvfupyriukwtwzmtdzhjjjvbtvipdydfpuhppwlgqkjejzdungzanikwxjfvueexixiijndqebukopzloijnfeaaxszdmucsnoekvtyeuumciaiejszfpbjycmhrkwyggmepdwiozrtuwhvavwqbuvvilynkmwnxgzdkrdxfmzncodwynpnalkcdszrurdomwrlxkhimksxfgonzyqddkwloyzlzjbqmtwheqxnstrgiievyhncxldfamknzlxiljzbdlxqxpr",
40
+ "output": 1
41
+ },
42
+ {
43
+ "input": "yqhivnzqcocvfqhgvqxkcfhocjnznoolxrnwxzbsineaixufjiamlgmldrxloafwzolpuhhgjzrvrojeidhbwbwcteutzyywhrmjlakerewmiziitqznaltmzomrgpvgpwbpkywvmyqkwippfhkhvlfbcrdsbubddappnsnycsdnlngrbhgnlgssluoksblbihyklvdyyhhjqupuoqalnmnlhfaunchhdjzdhwqnwljoxpxlhfhlvyrszakxqlfevvkaczerteacdinyzjmhwjxasjduxvbretqugggbofxmylasweueiukrbssqaldazlaiqpsejuyruthckerfykmgrrinmxjhfieqnmrljasrkjgqwshlsjovapgwpnfdsfmhdblecofmbaacfejsukcevljtcwyvzzewkvenrvxdilnjjmnpprhooeuholgywqzbomkquqdzwuuxsfvpcralkxwgdxyalhcgqijlgfehbuxcclfibvdptmujvqhfbnddztuoevfrpjkeumktvbqtgfnicgsclslzldsqthutfbtqnaeuosaaxhhibhqrjihamstzwbbrzcghirxhcvbrypxutqscazmeyzjhxzojdngmddvzwosoamcxrjxkmmulhyblfpkaynjgwourolfoyrjzayaaxediyderdqmqwadcfpaojbwsnnvaqxsoseejvmmhghbbtnptpembvogsrfydsjrgrwxatozngpydtohlkghqgmqdsuvclpoxpsvqvfpaogdxzwwksdbppxsmdmoydpyodpweduqoslamnbcbffqrrqfhodzseelcqggfwwrrkqfyvgyrekztftudqzpznfyogmkvzfvbkcosklmgwqosfrmrmftkulppakfpbzocscdkfgkcwkogdfwxevksbliqqchmgssqvfgoriipdmnxbhtfoqmgsfjybjqtrbgbyzaczmhdlmkrilceozgsellqmjagzlsvtffmxypqprqndgstnvgpablhtzsvnpeeijtyqzbkkfhldzslagychnxkddfqppmysjaajjhoysabdwzzilgybwkieeqbyevqrzgfecbyoqnryaxewreiwhlnslqjsuywkqyvsbzpibbuxgocgldtijjoakjkvwxmsxmzpvawtbmexkmqrtdkfbkhyvzcalylixapqzndijurpmseorqqumgpphtryjwbbrmohemfbdsdmgwaxarxkfgpkcfijymafvukwnfxzpwaznvodaxjbwetnaviuvemhkjcooldkpjmkvbkgsybvhfkciwtleqjyszpnstkdbovbvsappylonldkulxrdwxwriplcnykhxwkxzuqlfekjbxhqcsutwbzykkuekedsnyxhkskbqtddngilnfhvmvvqcxeaqboquqznevvlnyfyzpphqxxyhekcwihpnezpkxohkvwvvqntgrtfotwbhhwlrtdutvmlfsimwfushiykknqqmcqymjnahecyjqwxohqscapsfljcktxsbmkohdlpmymrezgesnsfvmctzosucxmkkmikmryiuqjgqcpoidukfnovecypggfilcreegovvejgtwfxhoiqsujjpdyqkasiuuguzlyjkrfaklwsapzipgsrzbifwqabtipnswepvpyhahmiyjfcpxwgrlmdgvdgsxpudqybadmqwhligpinjejlhsiqdxeikmznpipzbbuwvbcxvlwcrileibwbjgaewkfrjfomtxraokhmpgrkcyhzhtanashgwpgovobfwdzffoplqxuqbswdnjegulwbexbhexobkohhwblikqzkcnvhtthmagqnxcayddczzosyxmnmtnkatpgeijsxgsdhxbgggjspbcbpyxpjisvopbioglglruagjmypxwwzlhiuomlfjabfkylwydhbjajcevfcwsvbrrxlylathfeqhcqxfmhfwpwhbygegcsclceetwzmbnyrhqrxqysesrbfjkqskfbtuffthkxjxyyvaoriefgzjyfumemwnkmkjnecgfrttbwllcraceknvowbxsxgcstvscnqbketnkeauaakgjmntxmrbccdhsntlvjhoklbalztozuwpcofevveemkvufvyanbkucinmsgwnhyqzwmndnckdgpxcgamjxqakmfvxgerklazphocdtqajzafvhmeookftbrxljhazdtiuxidecgffopkxrvestcsmtqtqiwkdncaetqwpnibxeqvvylbmcpvougxcnwqpknwwwryjhcxrbjyrkutfkirnvvuemhafbosxvsdrxtzdvihbvnhicuqqwuwdrrhfpqmjweetcoevvksitggaajxuoblzuprwliazyldariezdmadoolirbpxfvunygfgwkgxhkzyvfwxoeuoiuhmioaxaudkoraeesuvtwzcjswnxthbilrbespkethoqynrpvojreoolaeqpvpoeyrnyzjfodyzjbnexoiyzgnhghlpduaamxeznnadwgeraopjfxoczmopvwsfvfeaupjzxdzxvoovjtrscrofiqtjeuhyakfrmrngcikqwnrfiglfbwoicbnigxyoqiqkaviuzbanpkyvlcqzmtrghxdeqmlnpbrutcjfmgxevcquckqglxaodkwlbhzkwipzmmsxeiurbzxbkvwxqlgqcbodmurdgkhyurzwptptcdwcdwgvannmyneayxzzfyoecyaerolknnyaekkmtewrbbditbksqpgyarnkjkkcyludwquqtyzhjayvltcuuleeabjrptbvkxowrvwwhmzbwpjqthxxadnklhxsoiwodaacqxptxogcqydqeymvzlqfpaelgkxsariiauqleejrjfxcbcjozjzceqqrrdselviapclqrrnamuosadyuknzhjfwfbygzddfkzwbvexvpzhrqyhkypvfhpaekbaqovugugratkzocclmlmmjfvdcwupgdbgjtnyjzkcyytwkiqnfbwmfwksynsnshmifmrpukemqzbyktzvrjcqgowmxaccceuyqutmglqqtxsjpgduxyzyhbgkffbsqfcsekmlzzbgmfkerjoswqhawpjasprunoemhqeawbkxnqoghaoxfdwlsowjtdjpqlzczbshaliemdhrbckxmgsyvblhdwbpzuizvjfxdjtwzkuykvczchkopshoipgcamcbfygvzviuzmhnmucswmaure",
44
+ "output": 1
45
+ },
46
+ {
47
+ "input": "dzksearhykbtmifwqnbbkaaavdrenshbafjoxnywxjnemuhtkqfysisxiegpmiyqivghzmygudbjsbbttxyprrydfuwpeikyqzndtmflwxlbnngnynwcofpbfvkxcyiivojyqldcqppebymgdxbvgnszoephrnphlmxwxkxllqlqtrjblmanyttvqhviftqewqbedcveuchsdvyebgrfsgduwxyvnrerjwqfmzkgoxtwdajcgrtcfyfxrwwqnafsrfkrdabgoxcfdnjovzqmfliyxrqvfsbndzanfwnrqpnpanngxkpturxezfiixlnewfxlriyesarliloqvkrbturdbejvbgfujxfcvpogogmydeylbsblbpecflmoolddtfpivxkzwtvhpmcbtatksrdamfkpjimuwkrgjvsmiddnfnncdgianozehgxjdemodbhofbfayurtilmsngrmgblhnaptackggspelfarqbnvyfrqvghogbxzqxoxlgylzxqhtqsiqfqqzptoifrinvdlbpibppmfykvttyvrxwgcrdvmdsmatykljknhjuhhregfnideztrzpinpjipfpditfgqzhhrijwfaxvbyzmmogvpiqwwrzwbvnvxfdvfsplhcklvrrpylvohoyejdylgciiberyxtlkjzvsghwzfdhgbazdiuhgkmnttvmdsmasmzrlqtmsueneaqkcjkkxjyqratjzivhmkinaumrpzwnvmdgqjpmqbzklnkhwmnxgnvbauaikfegsuhaxigjqndxatdvyibomcaeujrrlbwvsgfvbfmoeilyerygiuwexpfpownvogafeecxbsplghcorfddunevrcaxdvirhuuesfrbauzlzqayauayycuinzcpwvgjzrxxhzdtavlmivjffdwrnrdltflqwrxpfkbqulqixbguxlymvlfjuqizobpgrizdbahmvlwvvhbdupsctzjnihnweznzoyjcjkvcgrxfppohzrrrhxjclzrpxkouwshnrudeijuwnybvjregvkagdivgxnodbkdqpmcpubtmiqbvgwbjobyjddyvwetyljiyyjvwaopfcnzvuaobswygvwfblrlargrczwafizpqbjnsfmhtkerwkbqctcyvstfgkrkkouhlbhymbqqzbelbpwknxiiegucihtifxvhsmybojprfsgvkajiploiqjhbupazgdynoovxeyxxvhbhxsryzwylbunyjjbuvypntyeoqmmtfmxwmfrgrxycstebeuexeqftfswyfnjyiodkqdbravssdydvbznkuwszevyyquiazfhllhxpragzhnahgkvvcxhxjqxeynsupwwclwblcytqmsgtmltwsgczrjoypjazifzhpmiiopkumozffkjuwdklkczsnqbgbhrtpbrbpchxzocroasjgjxotefhdvoqjwrtmqetlerxmlqplxhbehitzkhbrajnywhctvvxdvifdzocvkvjihrrtfzwyvpzrmwgerzcrpnddgsohcrqdlfmrarczbvewwhnyrxianlwkjgrskalzbmmlvooxxuwcdgxiwffklesawfkronojnqmkkgaovbrfeomqgwvgqfpvdafipktvfxtylwiusldkprwxyxvyvcezaptdlprnxzzwtuntgumznumvazkdupqifzlsoejbyvkiouplxztawgjovksulgddlumboamqtseyzzdnegxjswyxywexcljhjdnlblyzokuzndvmrbkidxqinnsuxivubucbreoolkpkavnbgegnjriefzigaxyzqflvqncxvpuzuuiwmttrycoqpwltgzkgkjrjnipudatvczknbparvuvwueqgafspsgicgcigozidjipdjkwsowywbgubjsjsfuttgxhjutdwuynpkxrbfngriroconvznighewuhnkoxcofgsbwjviunpmqjhmgjoiooqnzpxkmyytehdxzywcsgiizljfulbewyhmlkqbscuibjooombzzuggqmwlzpehqsmocgpqutlvuwfyuexharyfrrfxppwinuqzyvjbnycfdkaxpjwlfxuxbgibykzkahldzpfzvrpcraaefdyjnulzdsknrtjgmopzwtkenegcosmzlumderlqbioxrgjpnuuuesvzeiafpimeasomsfzwmoeykeqpwphuiefquzpfmbuahamcmyjmewyuhhqihmeuhldtzdhrclzgrdxikstdjheyqlodkpjjtuaegzenvqvbdwmlnyyopfvuyxsuxgjssvoeewjgqvzetavdckoejqevsxhdbdjfvehaulizraqumiqcfvccvjonwqgqmoitbczuuonnwpmksbtenpaefzmimpetudluipbcfhqttuyyamdqvadbxxqzoaftvjtcrktvupzlrowcxubvclfxmnkrglchwhspsjxomjzlcsfzaftzwwnstfncebiciiykzwrsgpqlpofsdrifyewnuddnaryuckivsgbzqpukhqpkdzwlfegsoexzjycvnfggxgwdipypsnzsltpbzjgpzeaatojkwvzqglzdseepoxymtmtvjaniesbmiaclufdtrzxwubkgltqiskfxuveparzdvawapwdtovofsuozqxcwklkmxhvvbfctzpsyxtjbtpbohxhiklbguvlpaliclkzghovzjatiuicdmmlsvlrqexcieguqxqrvxzppdxgrszcrchhnlpninbjpdyvwbuadecaxzonulzliuqcapxcqqkrhrwdkxrjfcsilcyxhcexdddvolgjeiuxfofjzhjcldzoxlayzbzmenwmafrkuobcnykckbsezskorubppjdqxlollocvpezamzthvbntznpniatjsikgdeubfxdbinmgubeqthjoetqmeenfivpciszkexobhginyyuxqllevkqfehqaobuzrzsndngkrzelejtzeozrdmhrsrljtsllelmgaukhupujkwklawnmoulydifmsrsqltkqyupsrdjrnzypolfrczlxncbqvrkzfpmrdtjhzohzcybjlpnzkxrvdgxplfqqfxwodbevxzalrhjzaqgcaertawnmdcmyoihqnvtlcvczogjnnhgskgsdadczycsfglfnefubfclqdonezqjlectlxrvwickmvdpjrunveahntivyraojpvyjpfwesfndlqpxmogdvngegcsihnpoaqpqkhijqilxzjopznhxekxxolptrmkwcvhgaxdrjaxnssqrwqvyhmspwihqsbfsidxipyirncpqldaulfchchxwwurdqltkhsibidgijtnwkursrrxfphnlhmsueflenoufijjbvdenbiphdxqbodjgtosydltyazkldavmgugotkjzxmvjjuwgithgqpmrbeaneahoqdroipsnyuetnbgkwxmqeecemcguukrylfyldhtdeeqgdhbixdnzzmzqmhcbpzrzahulkcckiqmwuvdornifpvqpc",
48
+ "output": 1
49
+ },
50
+ {
51
+ "input": "hpwniciubkrmdgcbnqeriqgssmmdawpsbfszfvczmbilvoyolorliojkivipopxckiqiczrvjyuaxnahiasgyigsbfjrtuagehixgnjuiavwjqpffozbvqkexkwgngwtidwufqpxhyplsclyfjcdclyxaxbijkrinlzqxxaawrdqwafmvemzbwgnnsctzmnoaaaewtfmghfzapvmjlkwfmdbfzclfbjbcfaayzrmogogkjtodzljthvmxgvifdinqkplxusimasyqnwxqlljjijjkzvtmtylwtwmpwroxkpzlpswrrdqjptasalltcmaaukoetwfisfriscwatogakfglkllrdzbflocpdoghrlvnkpqtthmiutafvbyyzrikpfqzlfxhawdjrxgncfirkzshtfkfrenenursdipwhdsqldueavlqloqckioromwdelrydqijcijpabzbjoxweppzhdbqwrevnufvotscfmltmaugeltzsdphcndzvkjkucszerthnabnjiuugbppyvayuxmnjhwzdtymhizfsapqkamwtmuedubvrhknfcaeshbgwneaajmsrnwrdwrjwlxosghfqrkebrblvrelfgkkdhafdbmncponnrcsesxrengjrekdbpvkoyjqtoiqxmialmzclcrxfgkarxrsgpweblwmlgbkdsrsxgcyqpsenkhhvbzsigstkxcxjmvvpoagtxexizojjibequycqapywurkrmelazlnwyqazgtsgtpgqkisleqgedpthiliuntrtyuxtcppyrlxeswrcjhkfwcwmewjeqbvjyytlzxypptcexryaiqkrpjuibeaghxrfxisnawbnosckzxkzknieyectrulwxzwqdpsfjwiznogyxqrjgwqubcultmcaxikxazbnvrgpovfsgkqozvxngmcahuisvkinenteyhtjucsytlspuoinbpqtymcrkkjyglmfxtehgvqqllbndtfptkquenjwjyolvlofqlouztsebmymtcgbzuxozlgcfxparlbkvrofxvgoqhylgkndrleadlfmjcojlzthvztfsatxxprmpsyyjgohxcqowklrvnrdhollpqsfloaqadwnfcrddzuapzmytrbwgpbepsjvyodyfmbhqxwnvxllrnuiitscczymcdlwfyvqnxsdyvnxkmlajavrxfnohqcxlacrqoxuqcodufddnbvfsaeqsmdspabjfsmmfyosuvcdxgnidafsfvlqmknkyzpzrhvsdzecbcfqswdldunyqtkxgmfpeqzitbfnvlqeorinmqwrahjdrdjkpplaytdumbwmiqmwqpmlfusjfbfxbckflklecryjxocgcstxtesduvnkfkjucscerlkkkmmzlcsrfcfcareqdzwfltsynlsrkgfqwyeoetlazvnsqnoudcsmlrytuixfmgtjeyvjqitklgeoxczvszvztmaqmztknlzpakranusxikseeykecovtmaflcsyinnbfrwxekfzglenzkxuitaitemnennxgmitmdfbrwzlxdbwsnfvrwxebvypowycwknouynfaeroxkhsbkemzephaqjqfwqyginufhfguwsbrmccwatqpmnijabesbqrqrydagiiaqajqhfbqwfwaywkymjxxfzyrwbvsosysfgtmhpgcswbhdrhnykqzllhqbufxiqbwocvvodtrbdvyjrzkvmcrhctznneixgdvkmsnulfhubrrcyufticwopwniepokllunhozfaolxyevtybfluofgiokkczmvhyzhmhixykhhnqbjdkzcokvqljeusfvremjqpxrikbhihukgcindzwbowkprbprpjaffzyilgwriojfsyevemfzvmtrakquvppbejfjfldxrkavmmcbwdpwitbpjbqnmnwnbcuvudlasqpcijceugucbiufvbofwhiuubnlonipcnawmvzspygrhohnpdcfivsottoirdossaoybdmixgenytzechmrrkwiegusxzvazoeiunmtdtngkixlxthsitzvvrgdcgyrsxkbeksdyfdnoccfcfubsflhuvfgotdfpcgnutqtilaryoanqljfyxmvilyegveapyhvgxcvgohpzpesqybazjthcjohyomzpnsyclefvjlougqfcdszvkzanzzdrmfwqgjxmmtzholwxrnjqxirflhonyljstbehbkhsthvunqxfyyotclmebijjkxaptumpnyyqvevmdhuklnrodookfcklqsleuejcewchovfzzayyffqpravndwczmystdrqgorgtbpkclldadfwdleovjgtljummmdyytktidxqmfxeandqlwolbraptzqkrtmtvpysjqjwxibpqkayirqtpvwxyyaohfkztxcktnntxcqwatthwmvizahsciwhjapkwwqaulswvwsupwfgbqscesufjhhrxvsvhfvarviydieysrielsiolqtvcronytshenlbgclxyrvhukbzuyaqilioyvutsnijlwyghcceyvgkcqdqvkjbxucrfpnbjwrxflrhlynpcaylcphiyiuymgrdxpnxbwbcojjmncooywfdwstaaibuyxllrgvxnsbqbmpsjhlrmjcoylnmuhlwdxysvkknidmzjlzzvebubtsdcerjhyyjxtvmffrplyusemhvrwmczqirgwwbuhcumqkiuwwuktujsikgphuydyhxwmhbugcvbqcqejwfpybppliicxwyqatzgzbcfagqyoaycnvyfrwonkwjbnlhuvnwrumtqbdkv",
52
+ "output": 1
53
+ },
54
+ {
55
+ "input": "zkgepeixyskrggfbkwiafeycaaodrnkpkundhqbpbybxsgxexuuxylciaddfpmahmqaybpfyhivaqavswoxfhxkcdvgkuetwxlafzfgjykleyufgvkxbfdcoxrpjjbcookvmqlfugjrihjiewrojfbpcajpokfxmojekrqasnxbkpgwkttbovprcokdtxwyyjjrnuipuccdbngrkzxddqleixyvpcbxgtdxdwtjoykkbnghqmpujddrspfsagbdgbryjzoshorjrrodtjfqgaotuxniakkwcihweacppsllgleqbcsqmzflnhoneikvmlraawpubvhogbshcmzbojkdgjqshhvdiwrsaossuspejhuvatuowzzxxmlvddnjiumkbvxreeoqywucruczpgksiufwxwpconodokeurcpqmacmblgxuxmhytgtqnrrviqkdwfoonwnlsouxfkbdhnwjgizbgyerhrwuptaoscubhabodnhpzhuqlrtjzxqsgecbsxtymtfpibnsfstqevnygrdeunvfdqygklzewnjhwbdmeyvbebdgfqijjmhfkjylgvweoahjtqyljuctxcpmckrmcpxexehdjazndwdfoywfbbmjblzviklaehrtcpgtyvcbafphvhtbwdypdhppbfrcfiarcdigwawsfihupsadmsinafkbxlcudgijogzwrcbifnbhhgvfadiyvmkfcfgrtrjpgyoqmwvozvmvhylitkqjqamxcftrzabwxgnbsvrtofwpqodhpehhiienohzaghujqjjiwinpoycuukmluhdhmrinizqhwapuratinezgtiokydqkqtmuofwfswuwzelfplcwdgqmbdpkdgmuxuyaetfbiogkskkckndqtgcqwtxrauceebhkqedwrengzpludhrywxabmvnzsqlcmnktzdsjvsbwdgyrumvuyujqjcvuemhipzdpacdsgtgcodignofiwqzcxvkucbnsjcpuxtbrrnvqjlerzbkavvzecexfexmjvkgsyepgmqgltvjzcxhcsnsbzvayqeifeiptnjihnfqlagtwqakechbiyyzgfmlopuwgquwnqjgyxpyhhfovdwqpwpminrcjpnarawuolquixgnymywadxbyfoswkibsvxxcthachqaedukamcshmydqqishcmpuikgsedsnhxduaxeozwihobiauxpxqnclqcfozhlhdvsxvvkwysphhpmsgoqgzvsyeiartotrvulkecknzlygdsjmezogiaslcozpatruhsygpyukyouhbstelzxlaoukmuxabdpgryvftblavipapcavyhgjrinlxbbzzlqmyznrgxnqchrixxtgifvhxgbgnvdjtvqufduuonzaczxlpgclcdrbmwtjebyibohfenhbappsisglxdpskjzxecwvmbzkhvjhfjmklygidmzsggfwrflewocxyiwgkrfhdptiwejxlgdjdykdywdcyasyjbjmnyptasifziogkeybyducgwlkqyuteajgpbhqeuormkiweabybswnuerrervhulvzcdlxhdcsqhhyqcohibxgpbhegkdkpyxaxwljbuylwcmafrvlzmdrdulhqrpolprggezulyfyxbasnczjwlrfrcozlzddiblvcknzegwighlykrqigrnjuddrsohttgfjxuaxjgqlywqmmwsalajjgnltwdjvqttiefbpyqafmrbtenabscwayylwzldbpdgeddqwclyjhzhuhxutzpbitptpovbxazfabitmedshevodoeciwel",
56
+ "output": 1
57
+ },
58
+ {
59
+ "input": "jnyibgjjuziqbdrpdhshfchiebbrkleqkduulxshhyuekiiyberrfjxawwdushprszomonbgxpyfsdaxarbbgnxagplcxbofttbvzpvahacpjklvylbsvfitkmsgmqaehukukccihijfiyjstfswhfajwijebolkxnuprinlmearnhuhlbbmumhhzgxazhlozrlfrumacrmdzkzcdmbfkadsbvgkcszwttciwsoslelunkjharoutrclipvplaqwcdqrxcdnldsasjbcgcjcgokvocthqwmhrsmfiybivxqcbhufaawwoxjdskvshoohemdhvtsljngcwttssciqbghuusygayymyvkpqxnsoawemxaxouhdcibwhrwxsxnaesbcjrfexmsvqgexiowufltbszosvmuktutfaiyrdpugajxcjwxyknhjbybyyzpbsqurfkpnltaistpphawxmtqdmsdbjhrohnottwuqcyxhusgrhmfymmpciaxogfjawijyrbwovhjslecnqvkydzqssbcxbifvyqwgrbiugzpkexplquokhuqezkcncrbwrjiwjemfaybjcztgpicjisjzfpspbnwfusilthbxkwqibhtvmfuaobqsoqnoricejszyvzcuqxgyrrumnkpdkspbawtkplepewvzcurgptarchdwqkzfygtyvttaaftscczwjkarfzveotkpmlbmwmoohwjkrpazvkthaaibjexmpdpecrwhybraxcljrnffcrjnriziihvwvbdkkogapfolljzqqdmpcuwvdlersrityvapouhwmdaqpaywdomsliobizugevvsmuqlcehdujbwcdplkdoveztxqwzhyrqxmwglpoavyjqnaryjkpowwsceozcpintxazhjwgtblczpomtwcaraxhhkomkwsqvyxsdqvpnvopjxiwqnhtfaylaermadebwzowjerkzjngsdsvuxfsemodhljwmbmmvsugtxkzxdcdulrgdnupjohnqadvkbtoeutpsffjvdhqfarcpewbtepljlmyvryiwfgxsfluhnvplugtaohezvsgpxepwgtkuocjqlykznbywlynvjhcdldlbpkapnkopnjfnwhrjnkrfsgqngmapcvfihcdudpanjvqthvndoarocpqznfjqjteotjtokhxmolmmlaibzlfvmtyltuinfbcodoyxbtmkmcgcbbfjltxzfbwgxwtkgisbjbazafnnzntmgcbazwdacauezxkecbivieexvyehlbxthoxsjyhwmhvhbtxpkshwxsprorqbgvjnhrqqvvootuzvnejyfgokgaznopasxxjovbpwyrlveybxbujtwwpvxkexgzvmcpljjmkqolqhteqwukjomzempzwahpilwstwzlbqzgfarhxxskgqkyyhcyankopckwajgaiqyhgjvomeumedbnqqewggfalhxvovsdklqwdphlgrulrmqeekvymadizkmpcioqapxwkmxjxsybbknmqmxeeoccbmvwrbkwrwwyuvbbmrvhgblkhgwralecxwmssmjgunjssimoigoatceiubbkynukrczqlqautejpnanvtuuyxiwlgsonlhsjuuxxdrsooxoffhexexqgnuvtgyfultuwpjaiapebrjztflywcxhsggdqsaeujhgdkgmdkosxfzmyrlgdarvcsswhvuyoezcdhvfvrezmvkxvoaexmjmwrxsheejzyrdtvkqhqhxkdsylrpcxvvxekmwbahwktccxpavtrchdcdrldnowkphqboemaurctchwpopdbnqqaylxmlwwelmjitthkvohzqgxiblvsxssingxdfqmmxqzvktrzkkphswmmaewrarelpltmgbuekmtctrufukzckqjgnfwgqxqcegqwkojnnemoulpczdhzsjkcnxxnrcghiqlhewexmtncnyccbvfxbstljxvargyjlofeasycvqyisfkxwdhpkfeavkvwdwmppbxoqmcdeqjmimfaagreoxhrbdkhrwfivqlyimugwdlvcdnxgyblcyeipfcryqfksmykdhiiudpfzyshdcdlfwuzusbenerykujmkvptsfbivnzawhxdoqkpjftyjsvgiuxzhmnljrxgfwuyarazdlprgqttcoesfmsxvmscdqcytliqmlmbmkneblcpvispilzupxybewxosoapvtjnfrasccegdckebtsztjzkthhioflvynyhmawcwwjqsacdpbfowonhgwbgynavogabbpuotoytbwafhouxleyssrhruqwhcgrxkegkogodtxxpwandrmysrqwukgnsecixvpajkgdxctcbsoxjjspxcmxgvxjimjbkrzzxubkbwfiobdyrdtgpwrbphvpkzbzqtjxwonzmobreupoqrfvjerhjhgjibzwijmhblvtzpqukjyzlqtvanvxoplvquyibbmuctbvggxqdvzruaqaiaztoeprbasbrifsgdpcskpweslamvvqwietnxjayduysevfquudgqftnnaibytlppfajqgkpmfmfivjoimbfxqrgxbvsygqbdkqwhcjlrqzyrdkxfdgjcnwjfvlnhmwfivhmltylovyixeawrqwakdltwcuhohuosnskkebydgqvxkwznfqdplnaerizmnyzvsaagyvomvmiixvoyatstkcyrbnqsecgavcxeqaqjiiskknpitcubqphvtcatljedlekjfrnhahnccifzosthkbedivibvwmrbpptzhxrkigunoypyvukpjlsytgowpxymhyzwlwncggeeotnbcxsouajmjjnliigmvwhlctoqvvrlmjatslkiwghwalzicmkfkuvaxiwtktvgkebqmfvdkeoyfmgexmenkbzuqxaeyyooksfjuutyxumzvrjkxpwixbmnggqgnprpbgvhbqxicnazhwdjfmlpucfanivgckoxvxsanhkonoubkzyctftifvmvkigxsnowcbpebpiwkhtajkgmdhapwdxatwhlyomboovwbyyyrhzxrklczxocrdrcsiscqxctqabltbextrzfdzslpsmzeeebzgaxsbqxzjgniwsexlbccavbsqwktzaojrfzibssjtfdslajuicvumbaifkcoknoczcwfknjhqfzxszsfxofrcdbujdeojnevmweyhorilvhquooozilwhbggfyiawhejyukuwibpggvptlvgsfnbzmlhbsyhbrlrkmjwhsuemfqfskkhdumofsuhuzrzeytoqmhcvinhjsoihhjfnidzbazxvvmubjcydyfqlibntxnlkzjiiyrszyvcdniywbtsohjkwwixopwmhphaoefmcdnplpdwzoqjeesjvywpczjeetdgmfmwkpmptzxfztghkftswncwhcstgjsbljqiqcmxgnzhrhcbqyqcdcjwmvejezlefvjmhnmdlxvysqrlyvcjvneondgpbxpmymiifwiucaozciqbgmrquuyfcyhlxeagovyybdaasqvuzvhrqumllpefhwasooyhiwhrjpiuocmtqubwepjqmxqwtbjnogsnyytqygkaxnwuqrqdlafnuzruwstphiwwkxzpmuboygbqjxowxcbxamdefvjomgvwhmzxidbdgskmlmislblftbngppkbpknkbvcwihsoenhktymrmjxdsmuwguqjqjgwifnmvovumkhxnwvyqfaxleiyiqegmobsagxlgkfvnyslufkzqtrduaggqdysgnyhytatusqauevmioqpzrduomifuckokqkafbeowmzyinrsumuvanribdspsvqpyjrzpdifeebeehckpihrrrgrkzzojkhuzvfxjzkhtvnanlqecfdrksdccpknivtzhrmlrloftbyuhgtmovcgkjymdtejdewyuvezbnjlz",
60
+ "output": 1
61
+ },
62
+ {
63
+ "input": "wacfxjzmywbrxvylieialefwcywjhnjdsnnzmjrjxwaydpgyqntcaypafyzvqvjxtyfthydbgdgumcgoscagutwkktcxdbxvszpjrigewtsapyaowojxnkoxhzrkzkvmhepggenddvvttmruteuazltvknfsyxgwmysbudzcznizzdrlxmobydbbmeotqfyhuuzxoyjvjzkddzyifvpyiovcapdacmwczloxupflgxtbcbbjkjfcqwcoolgqqyqqmxwzzfhdndfkmerdukprgtjasoascefrqzyncchjbrqursdqupcquadlugynurobgxmdapxvniauhmqslzfkrlfqpdvvahlswtuzmjpraeyhwfuyxdpvhockrtjtqdhtxqkprcdrqpbhlramkwhkmwpijhebakdvljmwtklhymjayyzbiczpsmschkenmgpsydrrhvxczhjgqqbakxnpagpcxocpjcytokwzehuwghrwcznvzmwveaerdceeqryfydzcofquudyysnttlazwvnmmmddaclcrexcwqrmtbymwhdltisksjxufkxrbibwhleyucqzowizxlqdbrhqdctglkdwcctrxyfdmftdkxefaztlpodeebntdsyerzbrgznkzprzlksnhgatnaynixubknliojylcyigntnouomexsxynmoriuzlmudnsarebhvrdzthxuqtqtzfuxkwrnhlztfzcdeqphqnlvxsgofriosxossalstgvihqtmhlxiwnlzpagdtzpmgqhazqmveapjpmprmorvqlqcsbokdcgvjjgoukdaetsiuuvdpzukscpvavkrlaxrztzbxfwzstmfurhovgxrxispdyftuydpaverstakocsjwpleuweuqiadhdcwdfljmmdfgtortfskxbaxirlciupupmqgkoxatejxztewkttugytluyfkejqfanbgrkvlvoyefitsdztubqyaghbyfvqaxjxxrnlycsnogxfnkscoxqvqdzlqfwvydvjusszblwphksjysxuplytbjgezjfahckrxnvjikyaeierpaoarpgjawxtuhfnxdkgqtajmouwlkwusgvnqxeqmsqkwbkylcwbuwzseymxvidaxjoumkacrkepnkkxjhjgcytwximrghajmovqcuyhgmimmpkekexhmqvfnyzkhgdfhyuryfmftatstdxmmvaguiukezhulwndujpwjweypxcuzjvpckugbkpd",
64
+ "output": 1
65
+ }
66
+ ],
67
+ "haskell_template": "deleteString :: String -> Int\ndeleteString s ",
68
+ "ocaml_template": "let deleteString (s: string) : int = ",
69
+ "scala_template": "def deleteString(s: String): Int = { \n \n}",
70
+ "java_template": "public static int deleteString(String s) {\n\n}",
71
+ "python_template": "class Solution(object):\n def deleteString(self, s):\n \"\"\"\n :type s: str\n :rtype: int\n \"\"\"\n "
72
+ }
maximum_deletions_on_a_string/ocaml_tests/main.ml ADDED
@@ -0,0 +1,29 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+ module Main = struct
3
+ open OUnit2
4
+
5
+ (* Program start *)
6
+
7
+ (* Program end *)
8
+
9
+ (* Test cases *)
10
+
11
+ let test1 _ = assert_equal 2 (deleteString "abcabcdabc")
12
+
13
+ let test2 _ = assert_equal 4 (deleteString "aaabaab")
14
+
15
+ let test3 _ = assert_equal 5 (deleteString "aaaaa")
16
+
17
+
18
+ (* Grouping test cases *)
19
+ let suite = "Test Suite for deleteString" >::: [
20
+
21
+ "test1" >:: test1;
22
+ "test2" >:: test2;
23
+ "test3" >:: test3;
24
+ ]
25
+
26
+
27
+ (* Running the tests *)
28
+ let () = run_test_tt_main suite
29
+ end
maximum_deletions_on_a_string/scala_tests/MySuite.scala ADDED
@@ -0,0 +1,16 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+ class MySuite extends munit.FunSuite {
3
+
4
+ test("test1") {
5
+ assertEquals(Main.deleteString("abcabcdabc"), 2)
6
+ }
7
+
8
+ test("test2") {
9
+ assertEquals(Main.deleteString("aaabaab"), 4)
10
+ }
11
+
12
+ test("test3") {
13
+ assertEquals(Main.deleteString("aaaaa"), 5)
14
+ }
15
+
16
+ }
maximum_difference_between_adjacent_elements_in_a_circular_array/haskell_tests/Main.hs ADDED
@@ -0,0 +1,41 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+ module Main where
3
+ import Test.HUnit
4
+
5
+ --Program start
6
+ maxAdjacentDistance :: [Int] -> Int
7
+ maxAdjacentDistance nums = undefined
8
+
9
+ --Program end
10
+
11
+ -- Test cases
12
+
13
+ test1 :: Test
14
+ test1 = TestCase (assertEqual "for (maxAdjacentDistance [1,2,4])," 3 (maxAdjacentDistance [1,2,4]))
15
+
16
+ test2 :: Test
17
+ test2 = TestCase (assertEqual "for (maxAdjacentDistance [-5,-10,-5])," 5 (maxAdjacentDistance [-5,-10,-5]))
18
+
19
+ test3 :: Test
20
+ test3 = TestCase (assertEqual "for (maxAdjacentDistance [36, 97, ( -60), 77, ( -96), ( -74), ( -26), 59, ( -6), ( -58), 59, ( -30), ( -37), ( -29), 61, 1, ( -90), 76, ( -12), ( -75), 40, ( -9), ( -76), ( -45), ( -68), 32, ( -71), ( -47), 14, ( -75), 52, 15, ( -19), ( -16), 40, 32, 17, ( -23), ( -3), ( -83), ( -98), 13, ( -61), ( -48), ( -98)])," 173 (maxAdjacentDistance [36, 97, -60, 77, -96, -74, -26, 59, -6, -58, 59, -30, -37, -29, 61, 1, -90, 76, -12, -75, 40, -9, -76, -45, -68, 32, -71, -47, 14, -75, 52, 15, -19, -16, 40, 32, 17, -23, -3, -83, -98, 13, -61, -48, -98]))
21
+
22
+ test4 :: Test
23
+ test4 = TestCase (assertEqual "for (maxAdjacentDistance [88, ( -53), ( -67), ( -15), ( -69), ( -31), 89, 16, 99])," 141 (maxAdjacentDistance [88, -53, -67, -15, -69, -31, 89, 16, 99]))
24
+
25
+ test5 :: Test
26
+ test5 = TestCase (assertEqual "for (maxAdjacentDistance [-77, ( -9), 26, 62, ( -97), ( -71), ( -84), 39, ( -61), ( -97), ( -63), ( -48), ( -74), ( -49), ( -37), ( -11), 94, 17, ( -78), ( -1), ( -80), ( -30), ( -14), ( -100), ( -66), 54, 79, ( -4), 59, 41, ( -28), ( -40), ( -71), 84, ( -31), ( -56), 68, ( -58), 24, ( -45), ( -80), ( -94), 85, ( -36), ( -16), 49, ( -86), 70, 61, ( -65), 43])," 179 (maxAdjacentDistance [-77, -9, 26, 62, -97, -71, -84, 39, -61, -97, -63, -48, -74, -49, -37, -11, 94, 17, -78, -1, -80, -30, -14, -100, -66, 54, 79, -4, 59, 41, -28, -40, -71, 84, -31, -56, 68, -58, 24, -45, -80, -94, 85, -36, -16, 49, -86, 70, 61, -65, 43]))
27
+
28
+ test6 :: Test
29
+ test6 = TestCase (assertEqual "for (maxAdjacentDistance [-8, 20, 27, ( -48), ( -83), ( -15), ( -85), 11, 82, ( -33), ( -66), ( -46), 32, ( -52), ( -97), 1, 5, ( -19), 48, 16, ( -4), 82, 97, 92, ( -43), 5, 21, ( -60), 68, 98, ( -79), ( -62), ( -66), ( -61), ( -83), 50, ( -48), 35, 50, 8, ( -55), ( -75), ( -52), ( -24), ( -45), ( -36), 44, 58, ( -33), 94, ( -82), 98, ( -17), 43, 82, 58, ( -42), ( -44), ( -61), ( -47), ( -79), ( -100), ( -94), 58, 4, ( -56), ( -41), 89, 56, ( -21), 34, 24, 63, ( -90), ( -37), ( -58), 99, 49, 64, ( -100), ( -89), ( -48), ( -61), 67, 31, 73, 17])," 180 (maxAdjacentDistance [-8, 20, 27, -48, -83, -15, -85, 11, 82, -33, -66, -46, 32, -52, -97, 1, 5, -19, 48, 16, -4, 82, 97, 92, -43, 5, 21, -60, 68, 98, -79, -62, -66, -61, -83, 50, -48, 35, 50, 8, -55, -75, -52, -24, -45, -36, 44, 58, -33, 94, -82, 98, -17, 43, 82, 58, -42, -44, -61, -47, -79, -100, -94, 58, 4, -56, -41, 89, 56, -21, 34, 24, 63, -90, -37, -58, 99, 49, 64, -100, -89, -48, -61, 67, 31, 73, 17]))
30
+
31
+ test7 :: Test
32
+ test7 = TestCase (assertEqual "for (maxAdjacentDistance [-19, ( -69), ( -77), 19, ( -2), 65, ( -85), ( -47), ( -33), ( -72), ( -52), ( -71), 99, 29, ( -53), ( -53), ( -37), 84, 84, 62, 14, 69, 31, 12, ( -26), ( -39), ( -85), ( -74), 40, ( -58), 13, 17, ( -48), ( -73), 39, 65, 79, ( -92), 25, 52, 58, 94, ( -1), ( -50), ( -77), 61, 78, ( -12), ( -22), ( -81), 28, ( -99), 6, ( -70), 82, ( -3), 37, ( -54), 100, 52, 22, ( -24), ( -73), ( -48), 82, ( -23), ( -74), 13, 0, 54, ( -9), 41, ( -57), ( -63), ( -77), ( -14), 78, ( -72), 89, ( -83), ( -75), ( -27), ( -16), ( -35), ( -79), 33, 61, 45, ( -44), ( -23), ( -55), ( -18), 31, 21, 80, ( -44)])," 172 (maxAdjacentDistance [-19, -69, -77, 19, -2, 65, -85, -47, -33, -72, -52, -71, 99, 29, -53, -53, -37, 84, 84, 62, 14, 69, 31, 12, -26, -39, -85, -74, 40, -58, 13, 17, -48, -73, 39, 65, 79, -92, 25, 52, 58, 94, -1, -50, -77, 61, 78, -12, -22, -81, 28, -99, 6, -70, 82, -3, 37, -54, 100, 52, 22, -24, -73, -48, 82, -23, -74, 13, 0, 54, -9, 41, -57, -63, -77, -14, 78, -72, 89, -83, -75, -27, -16, -35, -79, 33, 61, 45, -44, -23, -55, -18, 31, 21, 80, -44]))
33
+
34
+
35
+ -- Grouping test cases
36
+ tests :: Test
37
+ tests = TestList [TestLabel "Test1" test1, TestLabel "Test2" test2, TestLabel "Test3" test3, TestLabel "Test4" test4, TestLabel "Test5" test5, TestLabel "Test6" test6]
38
+
39
+ -- Running the tests
40
+ main :: IO Counts
41
+ main = runTestTT tests
maximum_difference_between_adjacent_elements_in_a_circular_array/java_tests/Main.java ADDED
@@ -0,0 +1,20 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+ import static org.junit.jupiter.api.Assertions.*;
3
+ import org.junit.jupiter.api.Test;
4
+ import java.util.List;
5
+ import java.util.Arrays;
6
+ public class Main {
7
+ //Program start
8
+
9
+ //Program end
10
+
11
+ @Test
12
+ public void test1() {
13
+ assertEquals(3, maxAdjacentDistance(Arrays.asList(1,2,4)));
14
+ }
15
+ @Test
16
+ public void test2() {
17
+ assertEquals(5, maxAdjacentDistance(Arrays.asList(-5,-10,-5)));
18
+ }
19
+
20
+ }
maximum_difference_between_adjacent_elements_in_a_circular_array/meta.json ADDED
@@ -0,0 +1,340 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "id": 3747,
3
+ "name": "maximum_difference_between_adjacent_elements_in_a_circular_array",
4
+ "difficulty": "Easy",
5
+ "link": "https://leetcode.com/problems/maximum-difference-between-adjacent-elements-in-a-circular-array/",
6
+ "date": "2025-01-04 00:00:00",
7
+ "task_description": "Given a **circular** array `nums`, find the maximum absolute difference between adjacent elements. **Note**: In a circular array, the first and last elements are adjacent. **Example 1:** **Input:** nums = [1,2,4] **Output:** 3 **Explanation:** Because `nums` is circular, `nums[0]` and `nums[2]` are adjacent. They have the maximum absolute difference of `|4 - 1| = 3`. **Example 2:** **Input:** nums = [-5,-10,-5] **Output:** 5 **Explanation:** The adjacent elements `nums[0]` and `nums[1]` have the maximum absolute difference of `|-5 - (-10)| = 5`. **Constraints:** `2 <= nums.length <= 100` `-100 <= nums[i] <= 100`",
8
+ "public_test_cases": [
9
+ {
10
+ "label": "Example 1",
11
+ "input": "nums = [1,2,4]",
12
+ "output": "3 "
13
+ },
14
+ {
15
+ "label": "Example 2",
16
+ "input": "nums = [-5,-10,-5]",
17
+ "output": "5 "
18
+ }
19
+ ],
20
+ "private_test_cases": [
21
+ {
22
+ "input": [
23
+ 36,
24
+ 97,
25
+ -60,
26
+ 77,
27
+ -96,
28
+ -74,
29
+ -26,
30
+ 59,
31
+ -6,
32
+ -58,
33
+ 59,
34
+ -30,
35
+ -37,
36
+ -29,
37
+ 61,
38
+ 1,
39
+ -90,
40
+ 76,
41
+ -12,
42
+ -75,
43
+ 40,
44
+ -9,
45
+ -76,
46
+ -45,
47
+ -68,
48
+ 32,
49
+ -71,
50
+ -47,
51
+ 14,
52
+ -75,
53
+ 52,
54
+ 15,
55
+ -19,
56
+ -16,
57
+ 40,
58
+ 32,
59
+ 17,
60
+ -23,
61
+ -3,
62
+ -83,
63
+ -98,
64
+ 13,
65
+ -61,
66
+ -48,
67
+ -98
68
+ ],
69
+ "output": 173
70
+ },
71
+ {
72
+ "input": [
73
+ 88,
74
+ -53,
75
+ -67,
76
+ -15,
77
+ -69,
78
+ -31,
79
+ 89,
80
+ 16,
81
+ 99
82
+ ],
83
+ "output": 141
84
+ },
85
+ {
86
+ "input": [
87
+ -77,
88
+ -9,
89
+ 26,
90
+ 62,
91
+ -97,
92
+ -71,
93
+ -84,
94
+ 39,
95
+ -61,
96
+ -97,
97
+ -63,
98
+ -48,
99
+ -74,
100
+ -49,
101
+ -37,
102
+ -11,
103
+ 94,
104
+ 17,
105
+ -78,
106
+ -1,
107
+ -80,
108
+ -30,
109
+ -14,
110
+ -100,
111
+ -66,
112
+ 54,
113
+ 79,
114
+ -4,
115
+ 59,
116
+ 41,
117
+ -28,
118
+ -40,
119
+ -71,
120
+ 84,
121
+ -31,
122
+ -56,
123
+ 68,
124
+ -58,
125
+ 24,
126
+ -45,
127
+ -80,
128
+ -94,
129
+ 85,
130
+ -36,
131
+ -16,
132
+ 49,
133
+ -86,
134
+ 70,
135
+ 61,
136
+ -65,
137
+ 43
138
+ ],
139
+ "output": 179
140
+ },
141
+ {
142
+ "input": [
143
+ -8,
144
+ 20,
145
+ 27,
146
+ -48,
147
+ -83,
148
+ -15,
149
+ -85,
150
+ 11,
151
+ 82,
152
+ -33,
153
+ -66,
154
+ -46,
155
+ 32,
156
+ -52,
157
+ -97,
158
+ 1,
159
+ 5,
160
+ -19,
161
+ 48,
162
+ 16,
163
+ -4,
164
+ 82,
165
+ 97,
166
+ 92,
167
+ -43,
168
+ 5,
169
+ 21,
170
+ -60,
171
+ 68,
172
+ 98,
173
+ -79,
174
+ -62,
175
+ -66,
176
+ -61,
177
+ -83,
178
+ 50,
179
+ -48,
180
+ 35,
181
+ 50,
182
+ 8,
183
+ -55,
184
+ -75,
185
+ -52,
186
+ -24,
187
+ -45,
188
+ -36,
189
+ 44,
190
+ 58,
191
+ -33,
192
+ 94,
193
+ -82,
194
+ 98,
195
+ -17,
196
+ 43,
197
+ 82,
198
+ 58,
199
+ -42,
200
+ -44,
201
+ -61,
202
+ -47,
203
+ -79,
204
+ -100,
205
+ -94,
206
+ 58,
207
+ 4,
208
+ -56,
209
+ -41,
210
+ 89,
211
+ 56,
212
+ -21,
213
+ 34,
214
+ 24,
215
+ 63,
216
+ -90,
217
+ -37,
218
+ -58,
219
+ 99,
220
+ 49,
221
+ 64,
222
+ -100,
223
+ -89,
224
+ -48,
225
+ -61,
226
+ 67,
227
+ 31,
228
+ 73,
229
+ 17
230
+ ],
231
+ "output": 180
232
+ },
233
+ {
234
+ "input": [
235
+ -19,
236
+ -69,
237
+ -77,
238
+ 19,
239
+ -2,
240
+ 65,
241
+ -85,
242
+ -47,
243
+ -33,
244
+ -72,
245
+ -52,
246
+ -71,
247
+ 99,
248
+ 29,
249
+ -53,
250
+ -53,
251
+ -37,
252
+ 84,
253
+ 84,
254
+ 62,
255
+ 14,
256
+ 69,
257
+ 31,
258
+ 12,
259
+ -26,
260
+ -39,
261
+ -85,
262
+ -74,
263
+ 40,
264
+ -58,
265
+ 13,
266
+ 17,
267
+ -48,
268
+ -73,
269
+ 39,
270
+ 65,
271
+ 79,
272
+ -92,
273
+ 25,
274
+ 52,
275
+ 58,
276
+ 94,
277
+ -1,
278
+ -50,
279
+ -77,
280
+ 61,
281
+ 78,
282
+ -12,
283
+ -22,
284
+ -81,
285
+ 28,
286
+ -99,
287
+ 6,
288
+ -70,
289
+ 82,
290
+ -3,
291
+ 37,
292
+ -54,
293
+ 100,
294
+ 52,
295
+ 22,
296
+ -24,
297
+ -73,
298
+ -48,
299
+ 82,
300
+ -23,
301
+ -74,
302
+ 13,
303
+ 0,
304
+ 54,
305
+ -9,
306
+ 41,
307
+ -57,
308
+ -63,
309
+ -77,
310
+ -14,
311
+ 78,
312
+ -72,
313
+ 89,
314
+ -83,
315
+ -75,
316
+ -27,
317
+ -16,
318
+ -35,
319
+ -79,
320
+ 33,
321
+ 61,
322
+ 45,
323
+ -44,
324
+ -23,
325
+ -55,
326
+ -18,
327
+ 31,
328
+ 21,
329
+ 80,
330
+ -44
331
+ ],
332
+ "output": 172
333
+ }
334
+ ],
335
+ "haskell_template": "maxAdjacentDistance :: [Int] -> Int\nmaxAdjacentDistance nums ",
336
+ "ocaml_template": "let maxAdjacentDistance (nums: int list) : int = ",
337
+ "scala_template": "def maxAdjacentDistance(nums: List[Int]): Int = { \n \n}",
338
+ "java_template": "class Solution {\n public int maxAdjacentDistance(int[] nums) {\n \n }\n}",
339
+ "python_template": "class Solution(object):\n def maxAdjacentDistance(self, nums):\n \"\"\"\n :type nums: List[int]\n :rtype: int\n \"\"\"\n "
340
+ }
maximum_difference_between_adjacent_elements_in_a_circular_array/ocaml_tests/main.ml ADDED
@@ -0,0 +1,42 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+ module Main = struct
3
+ open OUnit2
4
+
5
+ (* Program start *)
6
+ let maxAdjacentDistance (nums: int list) : int = failwith "Not implemented"
7
+
8
+ (* Program end *)
9
+
10
+ (* Test cases *)
11
+
12
+ let test1 _ = assert_equal 3 (maxAdjacentDistance [1;2;4])
13
+
14
+ let test2 _ = assert_equal 5 (maxAdjacentDistance [-5;-10;-5])
15
+
16
+ let test3 _ = assert_equal 5 (maxAdjacentDistance [36; 97; -60; 77; -96; -74; -26; 59; -6; -58; 59; -30; -37; -29; 61; 1; -90; 76; -12; -75; 40; -9; -76; -45; -68; 32; -71; -47; 14; -75; 52; 15; -19; -16; 40; 32; 17; -23; -3; -83; -98; 13; -61; -48; -98])
17
+
18
+ let test4 _ = assert_equal 5 (maxAdjacentDistance [88; -53; -67; -15; -69; -31; 89; 16; 99])
19
+
20
+ let test5 _ = assert_equal 5 (maxAdjacentDistance [-77; -9; 26; 62; -97; -71; -84; 39; -61; -97; -63; -48; -74; -49; -37; -11; 94; 17; -78; -1; -80; -30; -14; -100; -66; 54; 79; -4; 59; 41; -28; -40; -71; 84; -31; -56; 68; -58; 24; -45; -80; -94; 85; -36; -16; 49; -86; 70; 61; -65; 43])
21
+
22
+ let test6 _ = assert_equal 5 (maxAdjacentDistance [-8; 20; 27; -48; -83; -15; -85; 11; 82; -33; -66; -46; 32; -52; -97; 1; 5; -19; 48; 16; -4; 82; 97; 92; -43; 5; 21; -60; 68; 98; -79; -62; -66; -61; -83; 50; -48; 35; 50; 8; -55; -75; -52; -24; -45; -36; 44; 58; -33; 94; -82; 98; -17; 43; 82; 58; -42; -44; -61; -47; -79; -100; -94; 58; 4; -56; -41; 89; 56; -21; 34; 24; 63; -90; -37; -58; 99; 49; 64; -100; -89; -48; -61; 67; 31; 73; 17])
23
+
24
+ let test7 _ = assert_equal 5 (maxAdjacentDistance [-19; -69; -77; 19; -2; 65; -85; -47; -33; -72; -52; -71; 99; 29; -53; -53; -37; 84; 84; 62; 14; 69; 31; 12; -26; -39; -85; -74; 40; -58; 13; 17; -48; -73; 39; 65; 79; -92; 25; 52; 58; 94; -1; -50; -77; 61; 78; -12; -22; -81; 28; -99; 6; -70; 82; -3; 37; -54; 100; 52; 22; -24; -73; -48; 82; -23; -74; 13; 0; 54; -9; 41; -57; -63; -77; -14; 78; -72; 89; -83; -75; -27; -16; -35; -79; 33; 61; 45; -44; -23; -55; -18; 31; 21; 80; -44])
25
+
26
+
27
+ (* Grouping test cases *)
28
+ let suite = "Test Suite for maxAdjacentDistance" >::: [
29
+
30
+ "test1" >:: test1;
31
+ "test2" >:: test2;
32
+ "test3" >:: test3;
33
+ "test4" >:: test4;
34
+ "test5" >:: test5;
35
+ "test6" >:: test6;
36
+ "test7" >:: test7;
37
+ ]
38
+
39
+
40
+ (* Running the tests *)
41
+ let () = run_test_tt_main suite
42
+ end
maximum_difference_between_adjacent_elements_in_a_circular_array/scala_tests/MySuite.scala ADDED
@@ -0,0 +1,32 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+ class MySuite extends munit.FunSuite {
3
+
4
+ test("test1") {
5
+ assertEquals(Main.maxAdjacentDistance(List(1,2,4)), 3)
6
+ }
7
+
8
+ test("test2") {
9
+ assertEquals(Main.maxAdjacentDistance(List(-5,-10,-5)), 5)
10
+ }
11
+
12
+ test("test3") {
13
+ assertEquals(Main.maxAdjacentDistance(36,97,-60,77,-96,-74,-26,59,-6,-58,59,-30,-37,-29,61,1,-90,76,-12,-75,40,-9,-76,-45,-68,32,-71,-47,14,-75,52,15,-19,-16,40,32,17,-23,-3,-83,-98,13,-61,-48,-98), 173)
14
+ }
15
+
16
+ test("test4") {
17
+ assertEquals(Main.maxAdjacentDistance(88,-53,-67,-15,-69,-31,89,16,99), 141)
18
+ }
19
+
20
+ test("test5") {
21
+ assertEquals(Main.maxAdjacentDistance(-77,-9,26,62,-97,-71,-84,39,-61,-97,-63,-48,-74,-49,-37,-11,94,17,-78,-1,-80,-30,-14,-100,-66,54,79,-4,59,41,-28,-40,-71,84,-31,-56,68,-58,24,-45,-80,-94,85,-36,-16,49,-86,70,61,-65,43), 179)
22
+ }
23
+
24
+ test("test6") {
25
+ assertEquals(Main.maxAdjacentDistance(-8,20,27,-48,-83,-15,-85,11,82,-33,-66,-46,32,-52,-97,1,5,-19,48,16,-4,82,97,92,-43,5,21,-60,68,98,-79,-62,-66,-61,-83,50,-48,35,50,8,-55,-75,-52,-24,-45,-36,44,58,-33,94,-82,98,-17,43,82,58,-42,-44,-61,-47,-79,-100,-94,58,4,-56,-41,89,56,-21,34,24,63,-90,-37,-58,99,49,64,-100,-89,-48,-61,67,31,73,17), 180)
26
+ }
27
+
28
+ test("test7") {
29
+ assertEquals(Main.maxAdjacentDistance(-19,-69,-77,19,-2,65,-85,-47,-33,-72,-52,-71,99,29,-53,-53,-37,84,84,62,14,69,31,12,-26,-39,-85,-74,40,-58,13,17,-48,-73,39,65,79,-92,25,52,58,94,-1,-50,-77,61,78,-12,-22,-81,28,-99,6,-70,82,-3,37,-54,100,52,22,-24,-73,-48,82,-23,-74,13,0,54,-9,41,-57,-63,-77,-14,78,-72,89,-83,-75,-27,-16,-35,-79,33,61,45,-44,-23,-55,-18,31,21,80,-44), 172)
30
+ }
31
+
32
+ }
maximum_difference_between_even_and_odd_frequency_i/haskell_tests/Main.hs ADDED
@@ -0,0 +1,41 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+ module Main where
3
+ import Test.HUnit
4
+
5
+ --Program start
6
+ maxDifference :: String -> Int
7
+ maxDifference s = undefined
8
+
9
+ --Program end
10
+
11
+ -- Test cases
12
+
13
+ test1 :: Test
14
+ test1 = TestCase (assertEqual "for (maxDifference \"aaaaabbc \")," 3 (maxDifference "aaaaabbc"))
15
+
16
+ test2 :: Test
17
+ test2 = TestCase (assertEqual "for (maxDifference \"abcabcab \")," 1 (maxDifference "abcabcab"))
18
+
19
+ test3 :: Test
20
+ test3 = TestCase (assertEqual "for (maxDifference \"bbzzrrrwwkkaaaafmmyvvnlllllljjtttggxxuoooqsciip \")," 1 (maxDifference "bbzzrrrwwkkaaaafmmyvvnlllllljjtttggxxuoooqsciip"))
21
+
22
+ test4 :: Test
23
+ test4 = TestCase (assertEqual "for (maxDifference \"qqqqtoolzzsxkkjnhceu \")," (-1) (maxDifference "qqqqtoolzzsxkkjnhceu"))
24
+
25
+ test5 :: Test
26
+ test5 = TestCase (assertEqual "for (maxDifference \"hyzzxnfueqqvr \")," (-1) (maxDifference "hyzzxnfueqqvr"))
27
+
28
+ test6 :: Test
29
+ test6 = TestCase (assertEqual "for (maxDifference \"jjjexxllqqqrrrrrkkkfffihssaaauuuuppppvvnzgybcm \")," 3 (maxDifference "jjjexxllqqqrrrrrkkkfffihssaaauuuuppppvvnzgybcm"))
30
+
31
+ test7 :: Test
32
+ test7 = TestCase (assertEqual "for (maxDifference \"nnnjssssspprrrruuuwwhhhvvviiqqdddooobmmaafffgcccyxx \")," 3 (maxDifference "nnnjssssspprrrruuuwwhhhvvviiqqdddooobmmaafffgcccyxx"))
33
+
34
+
35
+ -- Grouping test cases
36
+ tests :: Test
37
+ tests = TestList [TestLabel "Test1" test1, TestLabel "Test2" test2, TestLabel "Test3" test3, TestLabel "Test4" test4, TestLabel "Test5" test5, TestLabel "Test6" test6]
38
+
39
+ -- Running the tests
40
+ main :: IO Counts
41
+ main = runTestTT tests
maximum_difference_between_even_and_odd_frequency_i/java_tests/Main.java ADDED
@@ -0,0 +1,20 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+ import static org.junit.jupiter.api.Assertions.*;
3
+ import org.junit.jupiter.api.Test;
4
+ import java.util.List;
5
+ import java.util.Arrays;
6
+ public class Main {
7
+ //Program start
8
+
9
+ //Program end
10
+
11
+ @Test
12
+ public void test1() {
13
+ assertEquals(3, maxDifference("aaaaabbc"));
14
+ }
15
+ @Test
16
+ public void test2() {
17
+ assertEquals(1, maxDifference("abcabcab"));
18
+ }
19
+
20
+ }
maximum_difference_between_even_and_odd_frequency_i/meta.json ADDED
@@ -0,0 +1,47 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "id": 3753,
3
+ "name": "maximum_difference_between_even_and_odd_frequency_i",
4
+ "difficulty": "Easy",
5
+ "link": "https://leetcode.com/problems/maximum-difference-between-even-and-odd-frequency-i/",
6
+ "date": "2025-01-26 00:00:00",
7
+ "task_description": "You are given a string `s` consisting of lowercase English letters. Your task is to find the **maximum** difference between the frequency of **two** characters in the string such that: One of the characters has an **even frequency** in the string. The other character has an **odd frequency** in the string. Return the **maximum** difference, calculated as the frequency of the character with an odd frequency **minus** the frequency of the character with an even frequency. **Example 1:** **Input:** s = \"aaaaabbc\" **Output:** 3 **Explanation:** The character `'a'` has an **odd frequency** of `5`, and `'b'` has an **even frequency** of `2`. The maximum difference is `5 - 2 = 3`. **Example 2:** **Input:** s = \"abcabcab\" **Output:** 1 **Explanation:** The character `'a'` has an **odd frequency** of `3`, and `'c'` has an **even frequency** of 2. The maximum difference is `3 - 2 = 1`. **Constraints:** `3 <= s.length <= 100` `s` consists only of lowercase English letters. `s` contains at least one character with an odd frequency and one with an even frequency.",
8
+ "public_test_cases": [
9
+ {
10
+ "label": "Example 1",
11
+ "input": "s = \"aaaaabbc\"",
12
+ "output": "3 "
13
+ },
14
+ {
15
+ "label": "Example 2",
16
+ "input": "s = \"abcabcab\"",
17
+ "output": "1 "
18
+ }
19
+ ],
20
+ "private_test_cases": [
21
+ {
22
+ "input": "bbzzrrrwwkkaaaafmmyvvnlllllljjtttggxxuoooqsciip",
23
+ "output": 1
24
+ },
25
+ {
26
+ "input": "qqqqtoolzzsxkkjnhceu",
27
+ "output": -1
28
+ },
29
+ {
30
+ "input": "hyzzxnfueqqvr",
31
+ "output": -1
32
+ },
33
+ {
34
+ "input": "jjjexxllqqqrrrrrkkkfffihssaaauuuuppppvvnzgybcm",
35
+ "output": 3
36
+ },
37
+ {
38
+ "input": "nnnjssssspprrrruuuwwhhhvvviiqqdddooobmmaafffgcccyxx",
39
+ "output": 3
40
+ }
41
+ ],
42
+ "haskell_template": "maxDifference :: String -> Int\nmaxDifference s ",
43
+ "ocaml_template": "let maxDifference (s: string) : int = ",
44
+ "scala_template": "def maxDifference(s: String): Int = { \n \n}",
45
+ "java_template": "class Solution {\n public int maxDifference(String s) {\n \n }\n}",
46
+ "python_template": "class Solution(object):\n def maxDifference(self, s):\n \"\"\"\n :type s: str\n :rtype: int\n \"\"\"\n "
47
+ }
maximum_difference_between_even_and_odd_frequency_i/ocaml_tests/main.ml ADDED
@@ -0,0 +1,42 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+ module Main = struct
3
+ open OUnit2
4
+
5
+ (* Program start *)
6
+ let maxDifference (s: string) : int = failwith "Not implemented"
7
+
8
+ (* Program end *)
9
+
10
+ (* Test cases *)
11
+
12
+ let test1 _ = assert_equal 3 (maxDifference "aaaaabbc")
13
+
14
+ let test2 _ = assert_equal 1 (maxDifference "abcabcab")
15
+
16
+ let test3 _ = assert_equal 1 (maxDifference "bbzzrrrwwkkaaaafmmyvvnlllllljjtttggxxuoooqsciip")
17
+
18
+ let test4 _ = assert_equal 1 (maxDifference "qqqqtoolzzsxkkjnhceu")
19
+
20
+ let test5 _ = assert_equal 1 (maxDifference "hyzzxnfueqqvr")
21
+
22
+ let test6 _ = assert_equal 1 (maxDifference "jjjexxllqqqrrrrrkkkfffihssaaauuuuppppvvnzgybcm")
23
+
24
+ let test7 _ = assert_equal 1 (maxDifference "nnnjssssspprrrruuuwwhhhvvviiqqdddooobmmaafffgcccyxx")
25
+
26
+
27
+ (* Grouping test cases *)
28
+ let suite = "Test Suite for maxDifference" >::: [
29
+
30
+ "test1" >:: test1;
31
+ "test2" >:: test2;
32
+ "test3" >:: test3;
33
+ "test4" >:: test4;
34
+ "test5" >:: test5;
35
+ "test6" >:: test6;
36
+ "test7" >:: test7;
37
+ ]
38
+
39
+
40
+ (* Running the tests *)
41
+ let () = run_test_tt_main suite
42
+ end
maximum_difference_between_even_and_odd_frequency_i/scala_tests/MySuite.scala ADDED
@@ -0,0 +1,32 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+ class MySuite extends munit.FunSuite {
3
+
4
+ test("test1") {
5
+ assertEquals(Main.maxDifference("aaaaabbc"), 3)
6
+ }
7
+
8
+ test("test2") {
9
+ assertEquals(Main.maxDifference("abcabcab"), 1)
10
+ }
11
+
12
+ test("test3") {
13
+ assertEquals(Main.maxDifference(",b,b,z,z,r,r,r,w,w,k,k,a,a,a,a,f,m,m,y,v,v,n,l,l,l,l,l,l,j,j,t,t,t,g,g,x,x,u,o,o,o,q,s,c,i,i,p,"), 1)
14
+ }
15
+
16
+ test("test4") {
17
+ assertEquals(Main.maxDifference(",q,q,q,q,t,o,o,l,z,z,s,x,k,k,j,n,h,c,e,u,"), -1)
18
+ }
19
+
20
+ test("test5") {
21
+ assertEquals(Main.maxDifference(",h,y,z,z,x,n,f,u,e,q,q,v,r,"), -1)
22
+ }
23
+
24
+ test("test6") {
25
+ assertEquals(Main.maxDifference(",j,j,j,e,x,x,l,l,q,q,q,r,r,r,r,r,k,k,k,f,f,f,i,h,s,s,a,a,a,u,u,u,u,p,p,p,p,v,v,n,z,g,y,b,c,m,"), 3)
26
+ }
27
+
28
+ test("test7") {
29
+ assertEquals(Main.maxDifference(",n,n,n,j,s,s,s,s,s,p,p,r,r,r,r,u,u,u,w,w,h,h,h,v,v,v,i,i,q,q,d,d,d,o,o,o,b,m,m,a,a,f,f,f,g,c,c,c,y,x,x,"), 3)
30
+ }
31
+
32
+ }
maximum_difference_between_even_and_odd_frequency_ii/java_tests/Main.java ADDED
@@ -0,0 +1,25 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+ import static org.junit.jupiter.api.Assertions.*;
3
+ import org.junit.jupiter.api.Test;
4
+ import java.util.List;
5
+ import java.util.Arrays;
6
+ import java.util.ArrayList;
7
+ public class Main {
8
+ //Program start
9
+
10
+ //Program end
11
+
12
+ @Test
13
+ public void test1() {
14
+ assertEquals(-1, maxDifference("12233", 4));
15
+ }
16
+ @Test
17
+ public void test2() {
18
+ assertEquals(1, maxDifference("1122211", 3));
19
+ }
20
+ @Test
21
+ public void test3() {
22
+ assertEquals(-, maxDifference("110", 3));
23
+ }
24
+
25
+ }
maximum_difference_score_in_a_grid/haskell_tests/Main.hs ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:7efae49e0c05844e71c4ef94435fe254dd715f438003f20d1e889de7d69b60bc
3
+ size 16555533
maximum_difference_score_in_a_grid/java_tests/Main.java ADDED
@@ -0,0 +1,20 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+ import static org.junit.jupiter.api.Assertions.*;
3
+ import org.junit.jupiter.api.Test;
4
+ import java.util.List;
5
+ import java.util.Arrays;
6
+ public class Main {
7
+ //Program start
8
+
9
+ //Program end
10
+
11
+ @Test
12
+ public void test1() {
13
+ assertEquals(9, maxScore(Arrays.asList(Arrays.asList(9,5,7,3),Arrays.asList(8,9,6,1),Arrays.asList(6,7,14,3),Arrays.asList(2,5,3,1))));
14
+ }
15
+ @Test
16
+ public void test2() {
17
+ assertEquals(-1, maxScore(Arrays.asList(Arrays.asList(4,3,2),Arrays.asList(3,2,1))));
18
+ }
19
+
20
+ }
maximum_difference_score_in_a_grid/meta.json ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:095ac0b07dfe5debfd118a9de431937a75cf0dc9ff25a3c5dd05ba23c4db574e
3
+ size 61545954
maximum_difference_score_in_a_grid/ocaml_tests/main.ml ADDED
The diff for this file is too large to render. See raw diff
 
maximum_difference_score_in_a_grid/scala_tests/MySuite.scala ADDED
The diff for this file is too large to render. See raw diff
 
maximum_elegance_of_a_k_length_subsequence/.DS_Store ADDED
Binary file (6.15 kB). View file
 
maximum_elegance_of_a_k_length_subsequence/haskell_tests/Main.hs ADDED
@@ -0,0 +1,27 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+ module Main where
3
+ import Test.HUnit
4
+
5
+ --Program start
6
+
7
+ --Program end
8
+
9
+ -- Test cases
10
+
11
+ test1 :: Test
12
+ test1 = TestCase (assertEqual "for (findMaximumElegance [[3,2],[5,1],[10,1]] 2)," 17 (findMaximumElegance [[3,2],[5,1],[10,1]] 2))
13
+
14
+ test2 :: Test
15
+ test2 = TestCase (assertEqual "for (findMaximumElegance [[3,1],[3,1],[2,2],[5,3]] 3)," 19 (findMaximumElegance [[3,1],[3,1],[2,2],[5,3]] 3))
16
+
17
+ test3 :: Test
18
+ test3 = TestCase (assertEqual "for (findMaximumElegance [[1,1],[2,1],[3,1]] 3)," 7 (findMaximumElegance [[1,1],[2,1],[3,1]] 3))
19
+
20
+
21
+ -- Grouping test cases
22
+ tests :: Test
23
+ tests = TestList [TestLabel "Test1" test1, TestLabel "Test2" test2]
24
+
25
+ -- Running the tests
26
+ main :: IO Counts
27
+ main = runTestTT tests
maximum_elegance_of_a_k_length_subsequence/java_tests/Main.java ADDED
@@ -0,0 +1,25 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+ import static org.junit.jupiter.api.Assertions.*;
3
+ import org.junit.jupiter.api.Test;
4
+ import java.util.List;
5
+ import java.util.Arrays;
6
+ import java.util.ArrayList;
7
+ public class Main {
8
+ //Program start
9
+
10
+ //Program end
11
+
12
+ @Test
13
+ public void test1() {
14
+ assertEquals(17, findMaximumElegance(new ArrayList<>(Arrays.asList(new ArrayList<>(Arrays.asList(3,2)),new ArrayList<>(Arrays.asList(5,1)),new ArrayList<>(Arrays.asList(10,1)))), 2));
15
+ }
16
+ @Test
17
+ public void test2() {
18
+ assertEquals(19, findMaximumElegance(new ArrayList<>(Arrays.asList(new ArrayList<>(Arrays.asList(3,1)),new ArrayList<>(Arrays.asList(3,1)),new ArrayList<>(Arrays.asList(2,2)),new ArrayList<>(Arrays.asList(5,3)))), 3));
19
+ }
20
+ @Test
21
+ public void test3() {
22
+ assertEquals(7, findMaximumElegance(new ArrayList<>(Arrays.asList(new ArrayList<>(Arrays.asList(1,1)),new ArrayList<>(Arrays.asList(2,1)),new ArrayList<>(Arrays.asList(3,1)))), 3));
23
+ }
24
+
25
+ }
maximum_elegance_of_a_k_length_subsequence/meta.json ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:8745caeeb432cf18e55da911e1b6eb0abd10307d3a7bbd79609b0988c35abea1
3
+ size 49543574
maximum_elegance_of_a_k_length_subsequence/ocaml_tests/main.ml ADDED
@@ -0,0 +1,29 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+ module Main = struct
3
+ open OUnit2
4
+
5
+ (* Program start *)
6
+
7
+ (* Program end *)
8
+
9
+ (* Test cases *)
10
+
11
+ let test1 _ = assert_equal 17 (findMaximumElegance [[3;2];[5;1];[10;1]] 2)
12
+
13
+ let test2 _ = assert_equal 19 (findMaximumElegance [[3;1];[3;1];[2;2];[5;3]] 3)
14
+
15
+ let test3 _ = assert_equal 7 (findMaximumElegance [[1;1];[2;1];[3;1]] 3)
16
+
17
+
18
+ (* Grouping test cases *)
19
+ let suite = "Test Suite for findMaximumElegance" >::: [
20
+
21
+ "test1" >:: test1;
22
+ "test2" >:: test2;
23
+ "test3" >:: test3;
24
+ ]
25
+
26
+
27
+ (* Running the tests *)
28
+ let () = run_test_tt_main suite
29
+ end
maximum_elegance_of_a_k_length_subsequence/scala_tests/MySuite.scala ADDED
@@ -0,0 +1,16 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+ class MySuite extends munit.FunSuite {
3
+
4
+ test("test1") {
5
+ assertEquals(Main.findMaximumElegance(List(List(3,2),List(5,1),List(10,1)),2), 17)
6
+ }
7
+
8
+ test("test2") {
9
+ assertEquals(Main.findMaximumElegance(List(List(3,1),List(3,1),List(2,2),List(5,3)),3), 19)
10
+ }
11
+
12
+ test("test3") {
13
+ assertEquals(Main.findMaximumElegance(List(List(1,1),List(2,1),List(3,1)),3), 7)
14
+ }
15
+
16
+ }
maximum_enemy_forts_that_can_be_captured/.DS_Store ADDED
Binary file (6.15 kB). View file
 
maximum_enemy_forts_that_can_be_captured/haskell_tests/Main.hs ADDED
@@ -0,0 +1,24 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+ module Main where
3
+ import Test.HUnit
4
+
5
+ --Program start
6
+
7
+ --Program end
8
+
9
+ -- Test cases
10
+
11
+ test1 :: Test
12
+ test1 = TestCase (assertEqual "for (captureForts [1,0,0,-1,0,0,0,0,1])," 4 (captureForts [1,0,0,-1,0,0,0,0,1]))
13
+
14
+ test2 :: Test
15
+ test2 = TestCase (assertEqual "for (captureForts [0,0,1,-1])," 0 (captureForts [0,0,1,-1]))
16
+
17
+
18
+ -- Grouping test cases
19
+ tests :: Test
20
+ tests = TestList [TestLabel "Test1" test1]
21
+
22
+ -- Running the tests
23
+ main :: IO Counts
24
+ main = runTestTT tests
maximum_enemy_forts_that_can_be_captured/java_tests/Main.java ADDED
@@ -0,0 +1,21 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+ import static org.junit.jupiter.api.Assertions.*;
3
+ import org.junit.jupiter.api.Test;
4
+ import java.util.List;
5
+ import java.util.Arrays;
6
+ import java.util.ArrayList;
7
+ public class Main {
8
+ //Program start
9
+
10
+ //Program end
11
+
12
+ @Test
13
+ public void test1() {
14
+ assertEquals(4, captureForts(new ArrayList<>(Arrays.asList(1,0,0,-1,0,0,0,0,1))));
15
+ }
16
+ @Test
17
+ public void test2() {
18
+ assertEquals(0, captureForts(new ArrayList<>(Arrays.asList(0,0,1,-1))));
19
+ }
20
+
21
+ }
maximum_enemy_forts_that_can_be_captured/meta.json ADDED
The diff for this file is too large to render. See raw diff
 
maximum_enemy_forts_that_can_be_captured/ocaml_tests/main.ml ADDED
@@ -0,0 +1,26 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+ module Main = struct
3
+ open OUnit2
4
+
5
+ (* Program start *)
6
+
7
+ (* Program end *)
8
+
9
+ (* Test cases *)
10
+
11
+ let test1 _ = assert_equal 4 (captureForts [1;0;0;-1;0;0;0;0;1])
12
+
13
+ let test2 _ = assert_equal 0 (captureForts [0;0;1;-1])
14
+
15
+
16
+ (* Grouping test cases *)
17
+ let suite = "Test Suite for captureForts" >::: [
18
+
19
+ "test1" >:: test1;
20
+ "test2" >:: test2;
21
+ ]
22
+
23
+
24
+ (* Running the tests *)
25
+ let () = run_test_tt_main suite
26
+ end
maximum_enemy_forts_that_can_be_captured/scala_tests/MySuite.scala ADDED
@@ -0,0 +1,12 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+ class MySuite extends munit.FunSuite {
3
+
4
+ test("test1") {
5
+ assertEquals(Main.captureForts(List(1,0,0,-1,0,0,0,0,1)), 4)
6
+ }
7
+
8
+ test("test2") {
9
+ assertEquals(Main.captureForts(List(0,0,1,-1)), 0)
10
+ }
11
+
12
+ }
maximum_energy_boost_from_two_drinks/haskell_tests/Main.hs ADDED
@@ -0,0 +1,45 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+ module Main where
3
+ import Test.HUnit
4
+
5
+ --Program start
6
+
7
+ --Program end
8
+
9
+ -- Test cases
10
+
11
+ test1 :: Test
12
+ test1 = TestCase (assertEqual "for (maxEnergyBoost [1,3,1] [3,1,1])," 5 (maxEnergyBoost [1,3,1] [3,1,1]))
13
+
14
+ test2 :: Test
15
+ test2 = TestCase (assertEqual "for (maxEnergyBoost [4,1,1] [1,1,3])," 7 (maxEnergyBoost [4,1,1] [1,1,3]))
16
+
17
+ test3 :: Test
18
+ test3 = TestCase (assertEqual "for (maxEnergyBoost [28, 82, 48, 32, 55, 10, 18, 100, 26, 13, 77, 59, 49, 30, 17, 94, 93, 72, 61, 41, 70, 28, 54, 15, 80, 49, 2, 16, 54, 4, 80, 86, 87, 39, 91, 50, 85, 17, 94, 51, 36, 14, 73, 97, 41, 24, 49, 60, 2, 85, 99, 8, 84, 39, 48, 16, 18, 51, 105, 23, 95, 92, 103, 101, 77, 42, 96, 85, 65, 81, 88, 3, 9, 25, 79, 19, 45, 64, 91, 34, 25, 41] [80, 69, 52, 3, 36, 65, 55, 59, 1, 49, 26, 8, 34, 62, 55, 72, 65, 79, 71, 17, 20, 3, 103, 26, 70, 101, 43, 48, 45, 38, 83, 29, 55, 98, 24, 104, 33, 17, 53, 11, 34, 58, 38, 87, 1, 102, 99, 71, 42, 53, 73, 89, 3, 19, 88, 102, 12, 34, 94, 44, 3, 6, 39, 57, 104, 20, 76, 31, 103, 24, 37, 53, 22, 39, 33, 104, 100, 85, 36, 32, 71, 7])," 4817 (maxEnergyBoost [28, 82, 48, 32, 55, 10, 18, 100, 26, 13, 77, 59, 49, 30, 17, 94, 93, 72, 61, 41, 70, 28, 54, 15, 80, 49, 2, 16, 54, 4, 80, 86, 87, 39, 91, 50, 85, 17, 94, 51, 36, 14, 73, 97, 41, 24, 49, 60, 2, 85, 99, 8, 84, 39, 48, 16, 18, 51, 105, 23, 95, 92, 103, 101, 77, 42, 96, 85, 65, 81, 88, 3, 9, 25, 79, 19, 45, 64, 91, 34, 25, 41] [80, 69, 52, 3, 36, 65, 55, 59, 1, 49, 26, 8, 34, 62, 55, 72, 65, 79, 71, 17, 20, 3, 103, 26, 70, 101, 43, 48, 45, 38, 83, 29, 55, 98, 24, 104, 33, 17, 53, 11, 34, 58, 38, 87, 1, 102, 99, 71, 42, 53, 73, 89, 3, 19, 88, 102, 12, 34, 94, 44, 3, 6, 39, 57, 104, 20, 76, 31, 103, 24, 37, 53, 22, 39, 33, 104, 100, 85, 36, 32, 71, 7]))
19
+
20
+ test4 :: Test
21
+ test4 = TestCase (assertEqual "for (maxEnergyBoost [33, 1, 69, 49, 86, 17, 61, 82, 80, 34, 76, 19, 86, 46, 91, 32, 34, 39, 15, 60, 64, 63, 39, 82, 92, 47, 67, 36, 91, 64, 96, 28, 13, 45, 43, 18, 79, 38, 67, 33, 77, 26, 84, 68, 15, 91, 86, 82, 30, 44, 65, 71, 56, 72, 75, 71, 97, 68, 34, 12, 7, 55, 62, 77, 51, 13, 79, 28, 66, 21, 29, 13, 76, 27, 64, 84, 42, 5, 104] [17, 81, 81, 51, 95, 9, 90, 35, 31, 40, 66, 35, 65, 76, 13, 83, 53, 58, 1, 81, 31, 28, 75, 70, 54, 17, 59, 32, 39, 51, 26, 39, 12, 53, 13, 46, 5, 85, 25, 87, 14, 84, 97, 47, 17, 21, 66, 14, 85, 100, 50, 53, 63, 4, 61, 16, 105, 79, 51, 62, 48, 87, 31, 4, 50, 97, 21, 84, 43, 60, 91, 17, 11, 36, 13, 77, 80, 47, 38])," 4443 (maxEnergyBoost [33, 1, 69, 49, 86, 17, 61, 82, 80, 34, 76, 19, 86, 46, 91, 32, 34, 39, 15, 60, 64, 63, 39, 82, 92, 47, 67, 36, 91, 64, 96, 28, 13, 45, 43, 18, 79, 38, 67, 33, 77, 26, 84, 68, 15, 91, 86, 82, 30, 44, 65, 71, 56, 72, 75, 71, 97, 68, 34, 12, 7, 55, 62, 77, 51, 13, 79, 28, 66, 21, 29, 13, 76, 27, 64, 84, 42, 5, 104] [17, 81, 81, 51, 95, 9, 90, 35, 31, 40, 66, 35, 65, 76, 13, 83, 53, 58, 1, 81, 31, 28, 75, 70, 54, 17, 59, 32, 39, 51, 26, 39, 12, 53, 13, 46, 5, 85, 25, 87, 14, 84, 97, 47, 17, 21, 66, 14, 85, 100, 50, 53, 63, 4, 61, 16, 105, 79, 51, 62, 48, 87, 31, 4, 50, 97, 21, 84, 43, 60, 91, 17, 11, 36, 13, 77, 80, 47, 38]))
22
+
23
+ test5 :: Test
24
+ test5 = TestCase (assertEqual "for (maxEnergyBoost [73, 77, 30, 65, 52, 81, 13, 99, 54, 10, 18, 82, 55, 99, 45, 11, 57, 63, 11, 63, 53, 73, 79, 43, 103, 99, 43, 70, 93, 104, 53, 63, 65, 88, 31, 3, 50, 99, 45, 91, 69, 81, 67, 11, 42, 47, 70, 11, 48, 22, 50, 67, 36, 70, 50, 8] [90, 103, 19, 76, 53, 17, 91, 40, 94, 3, 78, 19, 101, 85, 89, 10, 40, 38, 35, 80, 102, 25, 105, 54, 77, 62, 8, 34, 38, 50, 101, 62, 93, 77, 29, 74, 83, 43, 72, 50, 28, 64, 10, 65, 104, 104, 80, 92, 65, 87, 97, 25, 31, 83, 27, 28])," 3540 (maxEnergyBoost [73, 77, 30, 65, 52, 81, 13, 99, 54, 10, 18, 82, 55, 99, 45, 11, 57, 63, 11, 63, 53, 73, 79, 43, 103, 99, 43, 70, 93, 104, 53, 63, 65, 88, 31, 3, 50, 99, 45, 91, 69, 81, 67, 11, 42, 47, 70, 11, 48, 22, 50, 67, 36, 70, 50, 8] [90, 103, 19, 76, 53, 17, 91, 40, 94, 3, 78, 19, 101, 85, 89, 10, 40, 38, 35, 80, 102, 25, 105, 54, 77, 62, 8, 34, 38, 50, 101, 62, 93, 77, 29, 74, 83, 43, 72, 50, 28, 64, 10, 65, 104, 104, 80, 92, 65, 87, 97, 25, 31, 83, 27, 28]))
25
+
26
+ test6 :: Test
27
+ test6 = TestCase (assertEqual "for (maxEnergyBoost [59, 38, 105, 67, 79, 22, 6, 84, 75, 96, 92, 98, 2, 5, 105, 34, 35, 30, 94, 89, 3, 35, 44, 37, 35, 29, 104, 17, 25, 42, 32, 16, 25, 42, 31, 78, 72, 25, 80, 98, 90, 74, 77, 7, 21, 66, 56, 91, 57, 16, 78, 89, 69, 16, 86, 63, 86, 99, 100, 44] [87, 46, 10, 81, 14, 74, 42, 43, 93, 48, 91, 65, 54, 18, 29, 103, 61, 29, 19, 20, 56, 98, 38, 43, 42, 31, 45, 19, 103, 34, 27, 96, 97, 32, 19, 64, 101, 94, 55, 87, 58, 54, 35, 47, 72, 11, 56, 26, 6, 59, 23, 81, 53, 102, 77, 72, 33, 81, 16, 46])," 3590 (maxEnergyBoost [59, 38, 105, 67, 79, 22, 6, 84, 75, 96, 92, 98, 2, 5, 105, 34, 35, 30, 94, 89, 3, 35, 44, 37, 35, 29, 104, 17, 25, 42, 32, 16, 25, 42, 31, 78, 72, 25, 80, 98, 90, 74, 77, 7, 21, 66, 56, 91, 57, 16, 78, 89, 69, 16, 86, 63, 86, 99, 100, 44] [87, 46, 10, 81, 14, 74, 42, 43, 93, 48, 91, 65, 54, 18, 29, 103, 61, 29, 19, 20, 56, 98, 38, 43, 42, 31, 45, 19, 103, 34, 27, 96, 97, 32, 19, 64, 101, 94, 55, 87, 58, 54, 35, 47, 72, 11, 56, 26, 6, 59, 23, 81, 53, 102, 77, 72, 33, 81, 16, 46]))
28
+
29
+ test7 :: Test
30
+ test7 = TestCase (assertEqual "for (maxEnergyBoost [97, 102, 36, 100, 20, 16, 44, 74, 8, 94, 1, 18, 89, 38, 96, 77, 33, 26, 103, 81, 4, 63, 84, 70, 15, 96, 66, 79, 89, 64, 48] [33, 8, 75, 37, 7, 72, 56, 52, 76, 31, 88, 14, 37, 27, 81, 74, 87, 24, 95, 42, 39, 50, 87, 65, 81, 24, 30, 95, 82, 99, 63])," 1931 (maxEnergyBoost [97, 102, 36, 100, 20, 16, 44, 74, 8, 94, 1, 18, 89, 38, 96, 77, 33, 26, 103, 81, 4, 63, 84, 70, 15, 96, 66, 79, 89, 64, 48] [33, 8, 75, 37, 7, 72, 56, 52, 76, 31, 88, 14, 37, 27, 81, 74, 87, 24, 95, 42, 39, 50, 87, 65, 81, 24, 30, 95, 82, 99, 63]))
31
+
32
+ test8 :: Test
33
+ test8 = TestCase (assertEqual "for (maxEnergyBoost [46, 75, 78, 22, 15, 88, 65, 19, 94, 5, 90, 18, 43, 1, 75, 65, 3, 88, 48, 4, 4, 80, 92, 9, 44, 16, 52, 21, 23, 76, 42, 44, 50, 43, 55, 69, 45, 3, 16, 49, 36, 70, 44, 70, 49, 10, 7, 19, 20, 7, 5, 10, 39, 26, 19, 8, 74, 32, 99, 32, 33, 16, 28, 36, 47, 1, 33, 62, 74, 12, 57, 47, 3, 72, 85, 28, 49, 74, 45, 44, 91, 37, 24, 31, 6, 11, 11, 31, 51, 95, 15, 65, 34, 37, 87, 66, 59] [34, 50, 20, 33, 79, 14, 59, 29, 37, 5, 20, 3, 40, 25, 85, 8, 7, 42, 10, 50, 40, 5, 16, 27, 37, 5, 10, 68, 41, 48, 23, 102, 91, 83, 13, 68, 60, 48, 23, 2, 48, 51, 26, 45, 95, 43, 86, 83, 23, 22, 36, 12, 32, 19, 66, 28, 36, 84, 88, 79, 48, 14, 19, 73, 22, 33, 65, 87, 61, 42, 3, 88, 90, 85, 62, 8, 19, 34, 47, 49, 20, 91, 41, 60, 69, 28, 40, 73, 60, 17, 74, 58, 100, 71, 23, 13, 37])," 4791 (maxEnergyBoost [46, 75, 78, 22, 15, 88, 65, 19, 94, 5, 90, 18, 43, 1, 75, 65, 3, 88, 48, 4, 4, 80, 92, 9, 44, 16, 52, 21, 23, 76, 42, 44, 50, 43, 55, 69, 45, 3, 16, 49, 36, 70, 44, 70, 49, 10, 7, 19, 20, 7, 5, 10, 39, 26, 19, 8, 74, 32, 99, 32, 33, 16, 28, 36, 47, 1, 33, 62, 74, 12, 57, 47, 3, 72, 85, 28, 49, 74, 45, 44, 91, 37, 24, 31, 6, 11, 11, 31, 51, 95, 15, 65, 34, 37, 87, 66, 59] [34, 50, 20, 33, 79, 14, 59, 29, 37, 5, 20, 3, 40, 25, 85, 8, 7, 42, 10, 50, 40, 5, 16, 27, 37, 5, 10, 68, 41, 48, 23, 102, 91, 83, 13, 68, 60, 48, 23, 2, 48, 51, 26, 45, 95, 43, 86, 83, 23, 22, 36, 12, 32, 19, 66, 28, 36, 84, 88, 79, 48, 14, 19, 73, 22, 33, 65, 87, 61, 42, 3, 88, 90, 85, 62, 8, 19, 34, 47, 49, 20, 91, 41, 60, 69, 28, 40, 73, 60, 17, 74, 58, 100, 71, 23, 13, 37]))
34
+
35
+ test9 :: Test
36
+ test9 = TestCase (assertEqual "for (maxEnergyBoost [100, 88, 9, 105, 36, 87, 12, 48, 13, 69, 53, 14, 95, 35, 77, 34, 41, 23, 45, 73, 36, 13, 9, 68, 105, 79, 94, 36, 30, 5, 67, 46, 99, 8, 24, 61, 91, 27, 46, 66, 81, 53, 47, 23, 8, 92, 17, 57, 8] [15, 53, 85, 32, 22, 68, 43, 65, 97, 30, 18, 21, 13, 82, 85, 104, 69, 10, 37, 92, 42, 37, 26, 63, 28, 96, 61, 24, 62, 84, 91, 101, 43, 24, 23, 68, 85, 19, 18, 62, 12, 31, 2, 81, 14, 14, 18, 95, 88])," 2759 (maxEnergyBoost [100, 88, 9, 105, 36, 87, 12, 48, 13, 69, 53, 14, 95, 35, 77, 34, 41, 23, 45, 73, 36, 13, 9, 68, 105, 79, 94, 36, 30, 5, 67, 46, 99, 8, 24, 61, 91, 27, 46, 66, 81, 53, 47, 23, 8, 92, 17, 57, 8] [15, 53, 85, 32, 22, 68, 43, 65, 97, 30, 18, 21, 13, 82, 85, 104, 69, 10, 37, 92, 42, 37, 26, 63, 28, 96, 61, 24, 62, 84, 91, 101, 43, 24, 23, 68, 85, 19, 18, 62, 12, 31, 2, 81, 14, 14, 18, 95, 88]))
37
+
38
+
39
+ -- Grouping test cases
40
+ tests :: Test
41
+ tests = TestList [TestLabel "Test1" test1, TestLabel "Test2" test2, TestLabel "Test3" test3, TestLabel "Test4" test4, TestLabel "Test5" test5, TestLabel "Test6" test6, TestLabel "Test7" test7, TestLabel "Test8" test8, TestLabel "Test9" test9]
42
+
43
+ -- Running the tests
44
+ main :: IO Counts
45
+ main = runTestTT tests
maximum_energy_boost_from_two_drinks/java_tests/Main.java ADDED
@@ -0,0 +1,21 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+ import static org.junit.jupiter.api.Assertions.*;
3
+ import org.junit.jupiter.api.Test;
4
+ import java.util.List;
5
+ import java.util.Arrays;
6
+ import java.util.ArrayList;
7
+ public class Main {
8
+ //Program start
9
+
10
+ //Program end
11
+
12
+ @Test
13
+ public void test1() {
14
+ assertEquals(5, maxEnergyBoost(new ArrayList<>(Arrays.asList(1,3,1)), new ArrayList<>(Arrays.asList(3,1,1))));
15
+ }
16
+ @Test
17
+ public void test2() {
18
+ assertEquals(7, maxEnergyBoost(new ArrayList<>(Arrays.asList(4,1,1)), new ArrayList<>(Arrays.asList(1,1,3))));
19
+ }
20
+
21
+ }
maximum_energy_boost_from_two_drinks/meta.json ADDED
@@ -0,0 +1,1429 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "id": 3525,
3
+ "name": "maximum_energy_boost_from_two_drinks",
4
+ "difficulty": "Medium",
5
+ "link": "https://leetcode.com/problems/maximum-energy-boost-from-two-drinks/",
6
+ "date": "2024-08-11 00:00:00",
7
+ "task_description": "You are given two integer arrays `energyDrinkA` and `energyDrinkB` of the same length `n` by a futuristic sports scientist. These arrays represent the energy boosts per hour provided by two different energy drinks, A and B, respectively. You want to _maximize_ your total energy boost by drinking one energy drink _per hour_. However, if you want to switch from consuming one energy drink to the other, you need to wait for _one hour_ to cleanse your system (meaning you won't get any energy boost in that hour). Return the **maximum** total energy boost you can gain in the next `n` hours. **Note** that you can start consuming _either_ of the two energy drinks. **Example 1:** **Input:** energyDrinkA = [1,3,1], energyDrinkB = [3,1,1] **Output:** 5 **Explanation:** To gain an energy boost of 5, drink only the energy drink A (or only B). **Example 2:** **Input:** energyDrinkA = [4,1,1], energyDrinkB = [1,1,3] **Output:** 7 **Explanation:** To gain an energy boost of 7: Drink the energy drink A for the first hour. Switch to the energy drink B and we lose the energy boost of the second hour. Gain the energy boost of the drink B in the third hour. **Constraints:** `n == energyDrinkA.length == energyDrinkB.length` `3 <= n <= 105` `1 <= energyDrinkA[i], energyDrinkB[i] <= 105`",
8
+ "public_test_cases": [
9
+ {
10
+ "label": "Example 1",
11
+ "input": "energyDrinkA = [1,3,1], energyDrinkB = [3,1,1]",
12
+ "output": "5 "
13
+ },
14
+ {
15
+ "label": "Example 2",
16
+ "input": "energyDrinkA = [4,1,1], energyDrinkB = [1,1,3]",
17
+ "output": "7 "
18
+ }
19
+ ],
20
+ "private_test_cases": [
21
+ {
22
+ "input": [
23
+ [
24
+ 28,
25
+ 82,
26
+ 48,
27
+ 32,
28
+ 55,
29
+ 10,
30
+ 18,
31
+ 100,
32
+ 26,
33
+ 13,
34
+ 77,
35
+ 59,
36
+ 49,
37
+ 30,
38
+ 17,
39
+ 94,
40
+ 93,
41
+ 72,
42
+ 61,
43
+ 41,
44
+ 70,
45
+ 28,
46
+ 54,
47
+ 15,
48
+ 80,
49
+ 49,
50
+ 2,
51
+ 16,
52
+ 54,
53
+ 4,
54
+ 80,
55
+ 86,
56
+ 87,
57
+ 39,
58
+ 91,
59
+ 50,
60
+ 85,
61
+ 17,
62
+ 94,
63
+ 51,
64
+ 36,
65
+ 14,
66
+ 73,
67
+ 97,
68
+ 41,
69
+ 24,
70
+ 49,
71
+ 60,
72
+ 2,
73
+ 85,
74
+ 99,
75
+ 8,
76
+ 84,
77
+ 39,
78
+ 48,
79
+ 16,
80
+ 18,
81
+ 51,
82
+ 105,
83
+ 23,
84
+ 95,
85
+ 92,
86
+ 103,
87
+ 101,
88
+ 77,
89
+ 42,
90
+ 96,
91
+ 85,
92
+ 65,
93
+ 81,
94
+ 88,
95
+ 3,
96
+ 9,
97
+ 25,
98
+ 79,
99
+ 19,
100
+ 45,
101
+ 64,
102
+ 91,
103
+ 34,
104
+ 25,
105
+ 41
106
+ ],
107
+ [
108
+ 80,
109
+ 69,
110
+ 52,
111
+ 3,
112
+ 36,
113
+ 65,
114
+ 55,
115
+ 59,
116
+ 1,
117
+ 49,
118
+ 26,
119
+ 8,
120
+ 34,
121
+ 62,
122
+ 55,
123
+ 72,
124
+ 65,
125
+ 79,
126
+ 71,
127
+ 17,
128
+ 20,
129
+ 3,
130
+ 103,
131
+ 26,
132
+ 70,
133
+ 101,
134
+ 43,
135
+ 48,
136
+ 45,
137
+ 38,
138
+ 83,
139
+ 29,
140
+ 55,
141
+ 98,
142
+ 24,
143
+ 104,
144
+ 33,
145
+ 17,
146
+ 53,
147
+ 11,
148
+ 34,
149
+ 58,
150
+ 38,
151
+ 87,
152
+ 1,
153
+ 102,
154
+ 99,
155
+ 71,
156
+ 42,
157
+ 53,
158
+ 73,
159
+ 89,
160
+ 3,
161
+ 19,
162
+ 88,
163
+ 102,
164
+ 12,
165
+ 34,
166
+ 94,
167
+ 44,
168
+ 3,
169
+ 6,
170
+ 39,
171
+ 57,
172
+ 104,
173
+ 20,
174
+ 76,
175
+ 31,
176
+ 103,
177
+ 24,
178
+ 37,
179
+ 53,
180
+ 22,
181
+ 39,
182
+ 33,
183
+ 104,
184
+ 100,
185
+ 85,
186
+ 36,
187
+ 32,
188
+ 71,
189
+ 7
190
+ ]
191
+ ],
192
+ "output": 4817
193
+ },
194
+ {
195
+ "input": [
196
+ [
197
+ 33,
198
+ 1,
199
+ 69,
200
+ 49,
201
+ 86,
202
+ 17,
203
+ 61,
204
+ 82,
205
+ 80,
206
+ 34,
207
+ 76,
208
+ 19,
209
+ 86,
210
+ 46,
211
+ 91,
212
+ 32,
213
+ 34,
214
+ 39,
215
+ 15,
216
+ 60,
217
+ 64,
218
+ 63,
219
+ 39,
220
+ 82,
221
+ 92,
222
+ 47,
223
+ 67,
224
+ 36,
225
+ 91,
226
+ 64,
227
+ 96,
228
+ 28,
229
+ 13,
230
+ 45,
231
+ 43,
232
+ 18,
233
+ 79,
234
+ 38,
235
+ 67,
236
+ 33,
237
+ 77,
238
+ 26,
239
+ 84,
240
+ 68,
241
+ 15,
242
+ 91,
243
+ 86,
244
+ 82,
245
+ 30,
246
+ 44,
247
+ 65,
248
+ 71,
249
+ 56,
250
+ 72,
251
+ 75,
252
+ 71,
253
+ 97,
254
+ 68,
255
+ 34,
256
+ 12,
257
+ 7,
258
+ 55,
259
+ 62,
260
+ 77,
261
+ 51,
262
+ 13,
263
+ 79,
264
+ 28,
265
+ 66,
266
+ 21,
267
+ 29,
268
+ 13,
269
+ 76,
270
+ 27,
271
+ 64,
272
+ 84,
273
+ 42,
274
+ 5,
275
+ 104
276
+ ],
277
+ [
278
+ 17,
279
+ 81,
280
+ 81,
281
+ 51,
282
+ 95,
283
+ 9,
284
+ 90,
285
+ 35,
286
+ 31,
287
+ 40,
288
+ 66,
289
+ 35,
290
+ 65,
291
+ 76,
292
+ 13,
293
+ 83,
294
+ 53,
295
+ 58,
296
+ 1,
297
+ 81,
298
+ 31,
299
+ 28,
300
+ 75,
301
+ 70,
302
+ 54,
303
+ 17,
304
+ 59,
305
+ 32,
306
+ 39,
307
+ 51,
308
+ 26,
309
+ 39,
310
+ 12,
311
+ 53,
312
+ 13,
313
+ 46,
314
+ 5,
315
+ 85,
316
+ 25,
317
+ 87,
318
+ 14,
319
+ 84,
320
+ 97,
321
+ 47,
322
+ 17,
323
+ 21,
324
+ 66,
325
+ 14,
326
+ 85,
327
+ 100,
328
+ 50,
329
+ 53,
330
+ 63,
331
+ 4,
332
+ 61,
333
+ 16,
334
+ 105,
335
+ 79,
336
+ 51,
337
+ 62,
338
+ 48,
339
+ 87,
340
+ 31,
341
+ 4,
342
+ 50,
343
+ 97,
344
+ 21,
345
+ 84,
346
+ 43,
347
+ 60,
348
+ 91,
349
+ 17,
350
+ 11,
351
+ 36,
352
+ 13,
353
+ 77,
354
+ 80,
355
+ 47,
356
+ 38
357
+ ]
358
+ ],
359
+ "output": 4443
360
+ },
361
+ {
362
+ "input": [
363
+ [
364
+ 73,
365
+ 77,
366
+ 30,
367
+ 65,
368
+ 52,
369
+ 81,
370
+ 13,
371
+ 99,
372
+ 54,
373
+ 10,
374
+ 18,
375
+ 82,
376
+ 55,
377
+ 99,
378
+ 45,
379
+ 11,
380
+ 57,
381
+ 63,
382
+ 11,
383
+ 63,
384
+ 53,
385
+ 73,
386
+ 79,
387
+ 43,
388
+ 103,
389
+ 99,
390
+ 43,
391
+ 70,
392
+ 93,
393
+ 104,
394
+ 53,
395
+ 63,
396
+ 65,
397
+ 88,
398
+ 31,
399
+ 3,
400
+ 50,
401
+ 99,
402
+ 45,
403
+ 91,
404
+ 69,
405
+ 81,
406
+ 67,
407
+ 11,
408
+ 42,
409
+ 47,
410
+ 70,
411
+ 11,
412
+ 48,
413
+ 22,
414
+ 50,
415
+ 67,
416
+ 36,
417
+ 70,
418
+ 50,
419
+ 8
420
+ ],
421
+ [
422
+ 90,
423
+ 103,
424
+ 19,
425
+ 76,
426
+ 53,
427
+ 17,
428
+ 91,
429
+ 40,
430
+ 94,
431
+ 3,
432
+ 78,
433
+ 19,
434
+ 101,
435
+ 85,
436
+ 89,
437
+ 10,
438
+ 40,
439
+ 38,
440
+ 35,
441
+ 80,
442
+ 102,
443
+ 25,
444
+ 105,
445
+ 54,
446
+ 77,
447
+ 62,
448
+ 8,
449
+ 34,
450
+ 38,
451
+ 50,
452
+ 101,
453
+ 62,
454
+ 93,
455
+ 77,
456
+ 29,
457
+ 74,
458
+ 83,
459
+ 43,
460
+ 72,
461
+ 50,
462
+ 28,
463
+ 64,
464
+ 10,
465
+ 65,
466
+ 104,
467
+ 104,
468
+ 80,
469
+ 92,
470
+ 65,
471
+ 87,
472
+ 97,
473
+ 25,
474
+ 31,
475
+ 83,
476
+ 27,
477
+ 28
478
+ ]
479
+ ],
480
+ "output": 3540
481
+ },
482
+ {
483
+ "input": [
484
+ [
485
+ 59,
486
+ 38,
487
+ 105,
488
+ 67,
489
+ 79,
490
+ 22,
491
+ 6,
492
+ 84,
493
+ 75,
494
+ 96,
495
+ 92,
496
+ 98,
497
+ 2,
498
+ 5,
499
+ 105,
500
+ 34,
501
+ 35,
502
+ 30,
503
+ 94,
504
+ 89,
505
+ 3,
506
+ 35,
507
+ 44,
508
+ 37,
509
+ 35,
510
+ 29,
511
+ 104,
512
+ 17,
513
+ 25,
514
+ 42,
515
+ 32,
516
+ 16,
517
+ 25,
518
+ 42,
519
+ 31,
520
+ 78,
521
+ 72,
522
+ 25,
523
+ 80,
524
+ 98,
525
+ 90,
526
+ 74,
527
+ 77,
528
+ 7,
529
+ 21,
530
+ 66,
531
+ 56,
532
+ 91,
533
+ 57,
534
+ 16,
535
+ 78,
536
+ 89,
537
+ 69,
538
+ 16,
539
+ 86,
540
+ 63,
541
+ 86,
542
+ 99,
543
+ 100,
544
+ 44
545
+ ],
546
+ [
547
+ 87,
548
+ 46,
549
+ 10,
550
+ 81,
551
+ 14,
552
+ 74,
553
+ 42,
554
+ 43,
555
+ 93,
556
+ 48,
557
+ 91,
558
+ 65,
559
+ 54,
560
+ 18,
561
+ 29,
562
+ 103,
563
+ 61,
564
+ 29,
565
+ 19,
566
+ 20,
567
+ 56,
568
+ 98,
569
+ 38,
570
+ 43,
571
+ 42,
572
+ 31,
573
+ 45,
574
+ 19,
575
+ 103,
576
+ 34,
577
+ 27,
578
+ 96,
579
+ 97,
580
+ 32,
581
+ 19,
582
+ 64,
583
+ 101,
584
+ 94,
585
+ 55,
586
+ 87,
587
+ 58,
588
+ 54,
589
+ 35,
590
+ 47,
591
+ 72,
592
+ 11,
593
+ 56,
594
+ 26,
595
+ 6,
596
+ 59,
597
+ 23,
598
+ 81,
599
+ 53,
600
+ 102,
601
+ 77,
602
+ 72,
603
+ 33,
604
+ 81,
605
+ 16,
606
+ 46
607
+ ]
608
+ ],
609
+ "output": 3590
610
+ },
611
+ {
612
+ "input": [
613
+ [
614
+ 97,
615
+ 102,
616
+ 36,
617
+ 100,
618
+ 20,
619
+ 16,
620
+ 44,
621
+ 74,
622
+ 8,
623
+ 94,
624
+ 1,
625
+ 18,
626
+ 89,
627
+ 38,
628
+ 96,
629
+ 77,
630
+ 33,
631
+ 26,
632
+ 103,
633
+ 81,
634
+ 4,
635
+ 63,
636
+ 84,
637
+ 70,
638
+ 15,
639
+ 96,
640
+ 66,
641
+ 79,
642
+ 89,
643
+ 64,
644
+ 48
645
+ ],
646
+ [
647
+ 33,
648
+ 8,
649
+ 75,
650
+ 37,
651
+ 7,
652
+ 72,
653
+ 56,
654
+ 52,
655
+ 76,
656
+ 31,
657
+ 88,
658
+ 14,
659
+ 37,
660
+ 27,
661
+ 81,
662
+ 74,
663
+ 87,
664
+ 24,
665
+ 95,
666
+ 42,
667
+ 39,
668
+ 50,
669
+ 87,
670
+ 65,
671
+ 81,
672
+ 24,
673
+ 30,
674
+ 95,
675
+ 82,
676
+ 99,
677
+ 63
678
+ ]
679
+ ],
680
+ "output": 1931
681
+ },
682
+ {
683
+ "input": [
684
+ [
685
+ 46,
686
+ 75,
687
+ 78,
688
+ 22,
689
+ 15,
690
+ 88,
691
+ 65,
692
+ 19,
693
+ 94,
694
+ 5,
695
+ 90,
696
+ 18,
697
+ 43,
698
+ 1,
699
+ 75,
700
+ 65,
701
+ 3,
702
+ 88,
703
+ 48,
704
+ 4,
705
+ 4,
706
+ 80,
707
+ 92,
708
+ 9,
709
+ 44,
710
+ 16,
711
+ 52,
712
+ 21,
713
+ 23,
714
+ 76,
715
+ 42,
716
+ 44,
717
+ 50,
718
+ 43,
719
+ 55,
720
+ 69,
721
+ 45,
722
+ 3,
723
+ 16,
724
+ 49,
725
+ 36,
726
+ 70,
727
+ 44,
728
+ 70,
729
+ 49,
730
+ 10,
731
+ 7,
732
+ 19,
733
+ 20,
734
+ 7,
735
+ 5,
736
+ 10,
737
+ 39,
738
+ 26,
739
+ 19,
740
+ 8,
741
+ 74,
742
+ 32,
743
+ 99,
744
+ 32,
745
+ 33,
746
+ 16,
747
+ 28,
748
+ 36,
749
+ 47,
750
+ 1,
751
+ 33,
752
+ 62,
753
+ 74,
754
+ 12,
755
+ 57,
756
+ 47,
757
+ 3,
758
+ 72,
759
+ 85,
760
+ 28,
761
+ 49,
762
+ 74,
763
+ 45,
764
+ 44,
765
+ 91,
766
+ 37,
767
+ 24,
768
+ 31,
769
+ 6,
770
+ 11,
771
+ 11,
772
+ 31,
773
+ 51,
774
+ 95,
775
+ 15,
776
+ 65,
777
+ 34,
778
+ 37,
779
+ 87,
780
+ 66,
781
+ 59
782
+ ],
783
+ [
784
+ 34,
785
+ 50,
786
+ 20,
787
+ 33,
788
+ 79,
789
+ 14,
790
+ 59,
791
+ 29,
792
+ 37,
793
+ 5,
794
+ 20,
795
+ 3,
796
+ 40,
797
+ 25,
798
+ 85,
799
+ 8,
800
+ 7,
801
+ 42,
802
+ 10,
803
+ 50,
804
+ 40,
805
+ 5,
806
+ 16,
807
+ 27,
808
+ 37,
809
+ 5,
810
+ 10,
811
+ 68,
812
+ 41,
813
+ 48,
814
+ 23,
815
+ 102,
816
+ 91,
817
+ 83,
818
+ 13,
819
+ 68,
820
+ 60,
821
+ 48,
822
+ 23,
823
+ 2,
824
+ 48,
825
+ 51,
826
+ 26,
827
+ 45,
828
+ 95,
829
+ 43,
830
+ 86,
831
+ 83,
832
+ 23,
833
+ 22,
834
+ 36,
835
+ 12,
836
+ 32,
837
+ 19,
838
+ 66,
839
+ 28,
840
+ 36,
841
+ 84,
842
+ 88,
843
+ 79,
844
+ 48,
845
+ 14,
846
+ 19,
847
+ 73,
848
+ 22,
849
+ 33,
850
+ 65,
851
+ 87,
852
+ 61,
853
+ 42,
854
+ 3,
855
+ 88,
856
+ 90,
857
+ 85,
858
+ 62,
859
+ 8,
860
+ 19,
861
+ 34,
862
+ 47,
863
+ 49,
864
+ 20,
865
+ 91,
866
+ 41,
867
+ 60,
868
+ 69,
869
+ 28,
870
+ 40,
871
+ 73,
872
+ 60,
873
+ 17,
874
+ 74,
875
+ 58,
876
+ 100,
877
+ 71,
878
+ 23,
879
+ 13,
880
+ 37
881
+ ]
882
+ ],
883
+ "output": 4791
884
+ },
885
+ {
886
+ "input": [
887
+ [
888
+ 100,
889
+ 88,
890
+ 9,
891
+ 105,
892
+ 36,
893
+ 87,
894
+ 12,
895
+ 48,
896
+ 13,
897
+ 69,
898
+ 53,
899
+ 14,
900
+ 95,
901
+ 35,
902
+ 77,
903
+ 34,
904
+ 41,
905
+ 23,
906
+ 45,
907
+ 73,
908
+ 36,
909
+ 13,
910
+ 9,
911
+ 68,
912
+ 105,
913
+ 79,
914
+ 94,
915
+ 36,
916
+ 30,
917
+ 5,
918
+ 67,
919
+ 46,
920
+ 99,
921
+ 8,
922
+ 24,
923
+ 61,
924
+ 91,
925
+ 27,
926
+ 46,
927
+ 66,
928
+ 81,
929
+ 53,
930
+ 47,
931
+ 23,
932
+ 8,
933
+ 92,
934
+ 17,
935
+ 57,
936
+ 8
937
+ ],
938
+ [
939
+ 15,
940
+ 53,
941
+ 85,
942
+ 32,
943
+ 22,
944
+ 68,
945
+ 43,
946
+ 65,
947
+ 97,
948
+ 30,
949
+ 18,
950
+ 21,
951
+ 13,
952
+ 82,
953
+ 85,
954
+ 104,
955
+ 69,
956
+ 10,
957
+ 37,
958
+ 92,
959
+ 42,
960
+ 37,
961
+ 26,
962
+ 63,
963
+ 28,
964
+ 96,
965
+ 61,
966
+ 24,
967
+ 62,
968
+ 84,
969
+ 91,
970
+ 101,
971
+ 43,
972
+ 24,
973
+ 23,
974
+ 68,
975
+ 85,
976
+ 19,
977
+ 18,
978
+ 62,
979
+ 12,
980
+ 31,
981
+ 2,
982
+ 81,
983
+ 14,
984
+ 14,
985
+ 18,
986
+ 95,
987
+ 88
988
+ ]
989
+ ],
990
+ "output": 2759
991
+ },
992
+ {
993
+ "input": [
994
+ [
995
+ 28,
996
+ 20,
997
+ 57,
998
+ 73,
999
+ 56,
1000
+ 9,
1001
+ 35,
1002
+ 8,
1003
+ 57,
1004
+ 55,
1005
+ 7,
1006
+ 83,
1007
+ 43,
1008
+ 60,
1009
+ 30,
1010
+ 87,
1011
+ 32,
1012
+ 92,
1013
+ 94,
1014
+ 57,
1015
+ 60,
1016
+ 85,
1017
+ 70,
1018
+ 69,
1019
+ 31,
1020
+ 101,
1021
+ 33,
1022
+ 103,
1023
+ 103,
1024
+ 53,
1025
+ 15,
1026
+ 57,
1027
+ 78,
1028
+ 5,
1029
+ 3,
1030
+ 21,
1031
+ 6,
1032
+ 96,
1033
+ 76,
1034
+ 68,
1035
+ 16,
1036
+ 5,
1037
+ 50,
1038
+ 84,
1039
+ 9,
1040
+ 48,
1041
+ 105,
1042
+ 19,
1043
+ 77,
1044
+ 28,
1045
+ 18,
1046
+ 87,
1047
+ 89,
1048
+ 2,
1049
+ 8,
1050
+ 35,
1051
+ 19,
1052
+ 3,
1053
+ 22,
1054
+ 42,
1055
+ 95,
1056
+ 55,
1057
+ 96,
1058
+ 7,
1059
+ 30,
1060
+ 32,
1061
+ 60,
1062
+ 94,
1063
+ 62,
1064
+ 64,
1065
+ 93,
1066
+ 9,
1067
+ 15,
1068
+ 33
1069
+ ],
1070
+ [
1071
+ 92,
1072
+ 62,
1073
+ 55,
1074
+ 100,
1075
+ 51,
1076
+ 23,
1077
+ 17,
1078
+ 18,
1079
+ 94,
1080
+ 57,
1081
+ 58,
1082
+ 68,
1083
+ 70,
1084
+ 82,
1085
+ 88,
1086
+ 58,
1087
+ 19,
1088
+ 5,
1089
+ 80,
1090
+ 103,
1091
+ 27,
1092
+ 37,
1093
+ 55,
1094
+ 67,
1095
+ 15,
1096
+ 32,
1097
+ 34,
1098
+ 12,
1099
+ 43,
1100
+ 92,
1101
+ 14,
1102
+ 18,
1103
+ 28,
1104
+ 90,
1105
+ 54,
1106
+ 83,
1107
+ 33,
1108
+ 26,
1109
+ 35,
1110
+ 18,
1111
+ 66,
1112
+ 83,
1113
+ 53,
1114
+ 54,
1115
+ 99,
1116
+ 103,
1117
+ 47,
1118
+ 9,
1119
+ 62,
1120
+ 95,
1121
+ 97,
1122
+ 20,
1123
+ 67,
1124
+ 5,
1125
+ 20,
1126
+ 104,
1127
+ 22,
1128
+ 61,
1129
+ 105,
1130
+ 98,
1131
+ 10,
1132
+ 7,
1133
+ 57,
1134
+ 72,
1135
+ 36,
1136
+ 98,
1137
+ 67,
1138
+ 95,
1139
+ 75,
1140
+ 64,
1141
+ 22,
1142
+ 88,
1143
+ 16,
1144
+ 75
1145
+ ]
1146
+ ],
1147
+ "output": 4474
1148
+ },
1149
+ {
1150
+ "input": [
1151
+ [
1152
+ 21,
1153
+ 11,
1154
+ 12,
1155
+ 17,
1156
+ 31,
1157
+ 17,
1158
+ 87,
1159
+ 45,
1160
+ 9,
1161
+ 90,
1162
+ 22,
1163
+ 5,
1164
+ 36,
1165
+ 49,
1166
+ 44,
1167
+ 13,
1168
+ 80,
1169
+ 23,
1170
+ 98,
1171
+ 35,
1172
+ 32,
1173
+ 25,
1174
+ 29,
1175
+ 97,
1176
+ 71,
1177
+ 82,
1178
+ 24,
1179
+ 25,
1180
+ 89,
1181
+ 1,
1182
+ 80,
1183
+ 39,
1184
+ 83,
1185
+ 34,
1186
+ 65,
1187
+ 20,
1188
+ 5,
1189
+ 20,
1190
+ 40,
1191
+ 7,
1192
+ 87,
1193
+ 43,
1194
+ 35,
1195
+ 1,
1196
+ 75,
1197
+ 67,
1198
+ 89,
1199
+ 57,
1200
+ 45,
1201
+ 80,
1202
+ 68,
1203
+ 68,
1204
+ 85,
1205
+ 91,
1206
+ 70,
1207
+ 61,
1208
+ 1,
1209
+ 92,
1210
+ 65,
1211
+ 85,
1212
+ 65,
1213
+ 14,
1214
+ 55,
1215
+ 89,
1216
+ 20,
1217
+ 25,
1218
+ 5,
1219
+ 4,
1220
+ 23,
1221
+ 30,
1222
+ 72,
1223
+ 69,
1224
+ 77
1225
+ ],
1226
+ [
1227
+ 45,
1228
+ 46,
1229
+ 8,
1230
+ 97,
1231
+ 62,
1232
+ 12,
1233
+ 36,
1234
+ 66,
1235
+ 74,
1236
+ 72,
1237
+ 80,
1238
+ 78,
1239
+ 48,
1240
+ 76,
1241
+ 93,
1242
+ 95,
1243
+ 55,
1244
+ 60,
1245
+ 58,
1246
+ 3,
1247
+ 7,
1248
+ 37,
1249
+ 65,
1250
+ 62,
1251
+ 6,
1252
+ 91,
1253
+ 78,
1254
+ 69,
1255
+ 86,
1256
+ 102,
1257
+ 26,
1258
+ 35,
1259
+ 103,
1260
+ 34,
1261
+ 50,
1262
+ 47,
1263
+ 37,
1264
+ 47,
1265
+ 33,
1266
+ 80,
1267
+ 81,
1268
+ 66,
1269
+ 29,
1270
+ 27,
1271
+ 103,
1272
+ 54,
1273
+ 21,
1274
+ 7,
1275
+ 93,
1276
+ 21,
1277
+ 16,
1278
+ 22,
1279
+ 26,
1280
+ 83,
1281
+ 43,
1282
+ 97,
1283
+ 44,
1284
+ 38,
1285
+ 69,
1286
+ 64,
1287
+ 37,
1288
+ 98,
1289
+ 79,
1290
+ 64,
1291
+ 30,
1292
+ 21,
1293
+ 78,
1294
+ 28,
1295
+ 32,
1296
+ 65,
1297
+ 4,
1298
+ 43,
1299
+ 96
1300
+ ]
1301
+ ],
1302
+ "output": 4200
1303
+ },
1304
+ {
1305
+ "input": [
1306
+ [
1307
+ 47,
1308
+ 7,
1309
+ 90,
1310
+ 75,
1311
+ 36,
1312
+ 12,
1313
+ 55,
1314
+ 100,
1315
+ 20,
1316
+ 97,
1317
+ 56,
1318
+ 85,
1319
+ 37,
1320
+ 72,
1321
+ 31,
1322
+ 60,
1323
+ 17,
1324
+ 88,
1325
+ 99,
1326
+ 101,
1327
+ 50,
1328
+ 58,
1329
+ 96,
1330
+ 105,
1331
+ 82,
1332
+ 68,
1333
+ 92,
1334
+ 97,
1335
+ 22,
1336
+ 24,
1337
+ 27,
1338
+ 49,
1339
+ 33,
1340
+ 5,
1341
+ 27,
1342
+ 86,
1343
+ 75,
1344
+ 44,
1345
+ 82,
1346
+ 51,
1347
+ 39,
1348
+ 39,
1349
+ 39,
1350
+ 96,
1351
+ 43,
1352
+ 46,
1353
+ 52,
1354
+ 71,
1355
+ 37,
1356
+ 57,
1357
+ 84,
1358
+ 55,
1359
+ 33,
1360
+ 13,
1361
+ 28
1362
+ ],
1363
+ [
1364
+ 65,
1365
+ 17,
1366
+ 28,
1367
+ 86,
1368
+ 46,
1369
+ 77,
1370
+ 51,
1371
+ 84,
1372
+ 83,
1373
+ 68,
1374
+ 48,
1375
+ 77,
1376
+ 73,
1377
+ 78,
1378
+ 100,
1379
+ 86,
1380
+ 43,
1381
+ 55,
1382
+ 14,
1383
+ 60,
1384
+ 98,
1385
+ 16,
1386
+ 89,
1387
+ 60,
1388
+ 79,
1389
+ 31,
1390
+ 53,
1391
+ 69,
1392
+ 63,
1393
+ 85,
1394
+ 80,
1395
+ 62,
1396
+ 37,
1397
+ 33,
1398
+ 32,
1399
+ 21,
1400
+ 4,
1401
+ 63,
1402
+ 77,
1403
+ 79,
1404
+ 74,
1405
+ 75,
1406
+ 42,
1407
+ 88,
1408
+ 8,
1409
+ 15,
1410
+ 66,
1411
+ 98,
1412
+ 81,
1413
+ 35,
1414
+ 79,
1415
+ 61,
1416
+ 33,
1417
+ 41,
1418
+ 25
1419
+ ]
1420
+ ],
1421
+ "output": 3438
1422
+ }
1423
+ ],
1424
+ "haskell_template": "maxEnergyBoost :: [Int] -> [Int] -> Int\nmaxEnergyBoost energyDrinkA energyDrinkB ",
1425
+ "ocaml_template": "let maxEnergyBoost (energyDrinkA: int list) (energyDrinkB: int list) : int = ",
1426
+ "scala_template": "def maxEnergyBoost(energyDrinkA: List[Int],energyDrinkB: List[Int]): Int = { \n \n}",
1427
+ "java_template": "class Solution {\n public long maxEnergyBoost(int[] energyDrinkA, int[] energyDrinkB) {\n \n }\n}",
1428
+ "python_template": "class Solution(object):\n def maxEnergyBoost(self, energyDrinkA, energyDrinkB):\n \"\"\"\n :type energyDrinkA: List[int]\n :type energyDrinkB: List[int]\n :rtype: int\n \"\"\"\n "
1429
+ }
maximum_energy_boost_from_two_drinks/ocaml_tests/main.ml ADDED
@@ -0,0 +1,50 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+ module Main = struct
3
+ open OUnit2
4
+
5
+ (* Program start *)
6
+
7
+ (* Program end *)
8
+
9
+ (* Test cases *)
10
+
11
+ let test1 _ = assert_equal 5 (maxEnergyBoost [1;3;1] [3;1;1])
12
+
13
+ let test2 _ = assert_equal 7 (maxEnergyBoost [4;1;1] [1;1;3])
14
+
15
+ let test3 _ = assert_equal 4817 (maxEnergyBoost [28; 82; 48; 32; 55; 10; 18; 100; 26; 13; 77; 59; 49; 30; 17; 94; 93; 72; 61; 41; 70; 28; 54; 15; 80; 49; 2; 16; 54; 4; 80; 86; 87; 39; 91; 50; 85; 17; 94; 51; 36; 14; 73; 97; 41; 24; 49; 60; 2; 85; 99; 8; 84; 39; 48; 16; 18; 51; 105; 23; 95; 92; 103; 101; 77; 42; 96; 85; 65; 81; 88; 3; 9; 25; 79; 19; 45; 64; 91; 34; 25; 41] [80; 69; 52; 3; 36; 65; 55; 59; 1; 49; 26; 8; 34; 62; 55; 72; 65; 79; 71; 17; 20; 3; 103; 26; 70; 101; 43; 48; 45; 38; 83; 29; 55; 98; 24; 104; 33; 17; 53; 11; 34; 58; 38; 87; 1; 102; 99; 71; 42; 53; 73; 89; 3; 19; 88; 102; 12; 34; 94; 44; 3; 6; 39; 57; 104; 20; 76; 31; 103; 24; 37; 53; 22; 39; 33; 104; 100; 85; 36; 32; 71; 7])
16
+
17
+ let test4 _ = assert_equal 4443 (maxEnergyBoost [33; 1; 69; 49; 86; 17; 61; 82; 80; 34; 76; 19; 86; 46; 91; 32; 34; 39; 15; 60; 64; 63; 39; 82; 92; 47; 67; 36; 91; 64; 96; 28; 13; 45; 43; 18; 79; 38; 67; 33; 77; 26; 84; 68; 15; 91; 86; 82; 30; 44; 65; 71; 56; 72; 75; 71; 97; 68; 34; 12; 7; 55; 62; 77; 51; 13; 79; 28; 66; 21; 29; 13; 76; 27; 64; 84; 42; 5; 104] [17; 81; 81; 51; 95; 9; 90; 35; 31; 40; 66; 35; 65; 76; 13; 83; 53; 58; 1; 81; 31; 28; 75; 70; 54; 17; 59; 32; 39; 51; 26; 39; 12; 53; 13; 46; 5; 85; 25; 87; 14; 84; 97; 47; 17; 21; 66; 14; 85; 100; 50; 53; 63; 4; 61; 16; 105; 79; 51; 62; 48; 87; 31; 4; 50; 97; 21; 84; 43; 60; 91; 17; 11; 36; 13; 77; 80; 47; 38])
18
+
19
+ let test5 _ = assert_equal 3540 (maxEnergyBoost [73; 77; 30; 65; 52; 81; 13; 99; 54; 10; 18; 82; 55; 99; 45; 11; 57; 63; 11; 63; 53; 73; 79; 43; 103; 99; 43; 70; 93; 104; 53; 63; 65; 88; 31; 3; 50; 99; 45; 91; 69; 81; 67; 11; 42; 47; 70; 11; 48; 22; 50; 67; 36; 70; 50; 8] [90; 103; 19; 76; 53; 17; 91; 40; 94; 3; 78; 19; 101; 85; 89; 10; 40; 38; 35; 80; 102; 25; 105; 54; 77; 62; 8; 34; 38; 50; 101; 62; 93; 77; 29; 74; 83; 43; 72; 50; 28; 64; 10; 65; 104; 104; 80; 92; 65; 87; 97; 25; 31; 83; 27; 28])
20
+
21
+ let test6 _ = assert_equal 3590 (maxEnergyBoost [59; 38; 105; 67; 79; 22; 6; 84; 75; 96; 92; 98; 2; 5; 105; 34; 35; 30; 94; 89; 3; 35; 44; 37; 35; 29; 104; 17; 25; 42; 32; 16; 25; 42; 31; 78; 72; 25; 80; 98; 90; 74; 77; 7; 21; 66; 56; 91; 57; 16; 78; 89; 69; 16; 86; 63; 86; 99; 100; 44] [87; 46; 10; 81; 14; 74; 42; 43; 93; 48; 91; 65; 54; 18; 29; 103; 61; 29; 19; 20; 56; 98; 38; 43; 42; 31; 45; 19; 103; 34; 27; 96; 97; 32; 19; 64; 101; 94; 55; 87; 58; 54; 35; 47; 72; 11; 56; 26; 6; 59; 23; 81; 53; 102; 77; 72; 33; 81; 16; 46])
22
+
23
+ let test7 _ = assert_equal 1931 (maxEnergyBoost [97; 102; 36; 100; 20; 16; 44; 74; 8; 94; 1; 18; 89; 38; 96; 77; 33; 26; 103; 81; 4; 63; 84; 70; 15; 96; 66; 79; 89; 64; 48] [33; 8; 75; 37; 7; 72; 56; 52; 76; 31; 88; 14; 37; 27; 81; 74; 87; 24; 95; 42; 39; 50; 87; 65; 81; 24; 30; 95; 82; 99; 63])
24
+
25
+ let test8 _ = assert_equal 4791 (maxEnergyBoost [46; 75; 78; 22; 15; 88; 65; 19; 94; 5; 90; 18; 43; 1; 75; 65; 3; 88; 48; 4; 4; 80; 92; 9; 44; 16; 52; 21; 23; 76; 42; 44; 50; 43; 55; 69; 45; 3; 16; 49; 36; 70; 44; 70; 49; 10; 7; 19; 20; 7; 5; 10; 39; 26; 19; 8; 74; 32; 99; 32; 33; 16; 28; 36; 47; 1; 33; 62; 74; 12; 57; 47; 3; 72; 85; 28; 49; 74; 45; 44; 91; 37; 24; 31; 6; 11; 11; 31; 51; 95; 15; 65; 34; 37; 87; 66; 59] [34; 50; 20; 33; 79; 14; 59; 29; 37; 5; 20; 3; 40; 25; 85; 8; 7; 42; 10; 50; 40; 5; 16; 27; 37; 5; 10; 68; 41; 48; 23; 102; 91; 83; 13; 68; 60; 48; 23; 2; 48; 51; 26; 45; 95; 43; 86; 83; 23; 22; 36; 12; 32; 19; 66; 28; 36; 84; 88; 79; 48; 14; 19; 73; 22; 33; 65; 87; 61; 42; 3; 88; 90; 85; 62; 8; 19; 34; 47; 49; 20; 91; 41; 60; 69; 28; 40; 73; 60; 17; 74; 58; 100; 71; 23; 13; 37])
26
+
27
+ let test9 _ = assert_equal 2759 (maxEnergyBoost [100; 88; 9; 105; 36; 87; 12; 48; 13; 69; 53; 14; 95; 35; 77; 34; 41; 23; 45; 73; 36; 13; 9; 68; 105; 79; 94; 36; 30; 5; 67; 46; 99; 8; 24; 61; 91; 27; 46; 66; 81; 53; 47; 23; 8; 92; 17; 57; 8] [15; 53; 85; 32; 22; 68; 43; 65; 97; 30; 18; 21; 13; 82; 85; 104; 69; 10; 37; 92; 42; 37; 26; 63; 28; 96; 61; 24; 62; 84; 91; 101; 43; 24; 23; 68; 85; 19; 18; 62; 12; 31; 2; 81; 14; 14; 18; 95; 88])
28
+
29
+ let test10 _ = assert_equal 4474 (maxEnergyBoost [28; 20; 57; 73; 56; 9; 35; 8; 57; 55; 7; 83; 43; 60; 30; 87; 32; 92; 94; 57; 60; 85; 70; 69; 31; 101; 33; 103; 103; 53; 15; 57; 78; 5; 3; 21; 6; 96; 76; 68; 16; 5; 50; 84; 9; 48; 105; 19; 77; 28; 18; 87; 89; 2; 8; 35; 19; 3; 22; 42; 95; 55; 96; 7; 30; 32; 60; 94; 62; 64; 93; 9; 15; 33] [92; 62; 55; 100; 51; 23; 17; 18; 94; 57; 58; 68; 70; 82; 88; 58; 19; 5; 80; 103; 27; 37; 55; 67; 15; 32; 34; 12; 43; 92; 14; 18; 28; 90; 54; 83; 33; 26; 35; 18; 66; 83; 53; 54; 99; 103; 47; 9; 62; 95; 97; 20; 67; 5; 20; 104; 22; 61; 105; 98; 10; 7; 57; 72; 36; 98; 67; 95; 75; 64; 22; 88; 16; 75])
30
+
31
+
32
+ (* Grouping test cases *)
33
+ let suite = "Test Suite for maxEnergyBoost" >::: [
34
+
35
+ "test1" >:: test1;
36
+ "test2" >:: test2;
37
+ "test3" >:: test3;
38
+ "test4" >:: test4;
39
+ "test5" >:: test5;
40
+ "test6" >:: test6;
41
+ "test7" >:: test7;
42
+ "test8" >:: test8;
43
+ "test9" >:: test9;
44
+ "test10" >:: test10;
45
+ ]
46
+
47
+
48
+ (* Running the tests *)
49
+ let () = run_test_tt_main suite
50
+ end
maximum_energy_boost_from_two_drinks/scala_tests/MySuite.scala ADDED
@@ -0,0 +1,44 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+ class MySuite extends munit.FunSuite {
3
+
4
+ test("test1") {
5
+ assertEquals(Main.maxEnergyBoost(List(1,3,1),List(3,1,1)), 5)
6
+ }
7
+
8
+ test("test2") {
9
+ assertEquals(Main.maxEnergyBoost(List(4,1,1),List(1,1,3)), 7)
10
+ }
11
+
12
+ test("test3") {
13
+ assertEquals(Main.maxEnergyBoost(List(28, 82, 48, 32, 55, 10, 18, 100, 26, 13, 77, 59, 49, 30, 17, 94, 93, 72, 61, 41, 70, 28, 54, 15, 80, 49, 2, 16, 54, 4, 80, 86, 87, 39, 91, 50, 85, 17, 94, 51, 36, 14, 73, 97, 41, 24, 49, 60, 2, 85, 99, 8, 84, 39, 48, 16, 18, 51, 105, 23, 95, 92, 103, 101, 77, 42, 96, 85, 65, 81, 88, 3, 9, 25, 79, 19, 45, 64, 91, 34, 25, 41),List(80, 69, 52, 3, 36, 65, 55, 59, 1, 49, 26, 8, 34, 62, 55, 72, 65, 79, 71, 17, 20, 3, 103, 26, 70, 101, 43, 48, 45, 38, 83, 29, 55, 98, 24, 104, 33, 17, 53, 11, 34, 58, 38, 87, 1, 102, 99, 71, 42, 53, 73, 89, 3, 19, 88, 102, 12, 34, 94, 44, 3, 6, 39, 57, 104, 20, 76, 31, 103, 24, 37, 53, 22, 39, 33, 104, 100, 85, 36, 32, 71, 7)), 4817)
14
+ }
15
+
16
+ test("test4") {
17
+ assertEquals(Main.maxEnergyBoost(List(33, 1, 69, 49, 86, 17, 61, 82, 80, 34, 76, 19, 86, 46, 91, 32, 34, 39, 15, 60, 64, 63, 39, 82, 92, 47, 67, 36, 91, 64, 96, 28, 13, 45, 43, 18, 79, 38, 67, 33, 77, 26, 84, 68, 15, 91, 86, 82, 30, 44, 65, 71, 56, 72, 75, 71, 97, 68, 34, 12, 7, 55, 62, 77, 51, 13, 79, 28, 66, 21, 29, 13, 76, 27, 64, 84, 42, 5, 104),List(17, 81, 81, 51, 95, 9, 90, 35, 31, 40, 66, 35, 65, 76, 13, 83, 53, 58, 1, 81, 31, 28, 75, 70, 54, 17, 59, 32, 39, 51, 26, 39, 12, 53, 13, 46, 5, 85, 25, 87, 14, 84, 97, 47, 17, 21, 66, 14, 85, 100, 50, 53, 63, 4, 61, 16, 105, 79, 51, 62, 48, 87, 31, 4, 50, 97, 21, 84, 43, 60, 91, 17, 11, 36, 13, 77, 80, 47, 38)), 4443)
18
+ }
19
+
20
+ test("test5") {
21
+ assertEquals(Main.maxEnergyBoost(List(73, 77, 30, 65, 52, 81, 13, 99, 54, 10, 18, 82, 55, 99, 45, 11, 57, 63, 11, 63, 53, 73, 79, 43, 103, 99, 43, 70, 93, 104, 53, 63, 65, 88, 31, 3, 50, 99, 45, 91, 69, 81, 67, 11, 42, 47, 70, 11, 48, 22, 50, 67, 36, 70, 50, 8),List(90, 103, 19, 76, 53, 17, 91, 40, 94, 3, 78, 19, 101, 85, 89, 10, 40, 38, 35, 80, 102, 25, 105, 54, 77, 62, 8, 34, 38, 50, 101, 62, 93, 77, 29, 74, 83, 43, 72, 50, 28, 64, 10, 65, 104, 104, 80, 92, 65, 87, 97, 25, 31, 83, 27, 28)), 3540)
22
+ }
23
+
24
+ test("test6") {
25
+ assertEquals(Main.maxEnergyBoost(List(59, 38, 105, 67, 79, 22, 6, 84, 75, 96, 92, 98, 2, 5, 105, 34, 35, 30, 94, 89, 3, 35, 44, 37, 35, 29, 104, 17, 25, 42, 32, 16, 25, 42, 31, 78, 72, 25, 80, 98, 90, 74, 77, 7, 21, 66, 56, 91, 57, 16, 78, 89, 69, 16, 86, 63, 86, 99, 100, 44),List(87, 46, 10, 81, 14, 74, 42, 43, 93, 48, 91, 65, 54, 18, 29, 103, 61, 29, 19, 20, 56, 98, 38, 43, 42, 31, 45, 19, 103, 34, 27, 96, 97, 32, 19, 64, 101, 94, 55, 87, 58, 54, 35, 47, 72, 11, 56, 26, 6, 59, 23, 81, 53, 102, 77, 72, 33, 81, 16, 46)), 3590)
26
+ }
27
+
28
+ test("test7") {
29
+ assertEquals(Main.maxEnergyBoost(List(97, 102, 36, 100, 20, 16, 44, 74, 8, 94, 1, 18, 89, 38, 96, 77, 33, 26, 103, 81, 4, 63, 84, 70, 15, 96, 66, 79, 89, 64, 48),List(33, 8, 75, 37, 7, 72, 56, 52, 76, 31, 88, 14, 37, 27, 81, 74, 87, 24, 95, 42, 39, 50, 87, 65, 81, 24, 30, 95, 82, 99, 63)), 1931)
30
+ }
31
+
32
+ test("test8") {
33
+ assertEquals(Main.maxEnergyBoost(List(46, 75, 78, 22, 15, 88, 65, 19, 94, 5, 90, 18, 43, 1, 75, 65, 3, 88, 48, 4, 4, 80, 92, 9, 44, 16, 52, 21, 23, 76, 42, 44, 50, 43, 55, 69, 45, 3, 16, 49, 36, 70, 44, 70, 49, 10, 7, 19, 20, 7, 5, 10, 39, 26, 19, 8, 74, 32, 99, 32, 33, 16, 28, 36, 47, 1, 33, 62, 74, 12, 57, 47, 3, 72, 85, 28, 49, 74, 45, 44, 91, 37, 24, 31, 6, 11, 11, 31, 51, 95, 15, 65, 34, 37, 87, 66, 59),List(34, 50, 20, 33, 79, 14, 59, 29, 37, 5, 20, 3, 40, 25, 85, 8, 7, 42, 10, 50, 40, 5, 16, 27, 37, 5, 10, 68, 41, 48, 23, 102, 91, 83, 13, 68, 60, 48, 23, 2, 48, 51, 26, 45, 95, 43, 86, 83, 23, 22, 36, 12, 32, 19, 66, 28, 36, 84, 88, 79, 48, 14, 19, 73, 22, 33, 65, 87, 61, 42, 3, 88, 90, 85, 62, 8, 19, 34, 47, 49, 20, 91, 41, 60, 69, 28, 40, 73, 60, 17, 74, 58, 100, 71, 23, 13, 37)), 4791)
34
+ }
35
+
36
+ test("test9") {
37
+ assertEquals(Main.maxEnergyBoost(List(100, 88, 9, 105, 36, 87, 12, 48, 13, 69, 53, 14, 95, 35, 77, 34, 41, 23, 45, 73, 36, 13, 9, 68, 105, 79, 94, 36, 30, 5, 67, 46, 99, 8, 24, 61, 91, 27, 46, 66, 81, 53, 47, 23, 8, 92, 17, 57, 8),List(15, 53, 85, 32, 22, 68, 43, 65, 97, 30, 18, 21, 13, 82, 85, 104, 69, 10, 37, 92, 42, 37, 26, 63, 28, 96, 61, 24, 62, 84, 91, 101, 43, 24, 23, 68, 85, 19, 18, 62, 12, 31, 2, 81, 14, 14, 18, 95, 88)), 2759)
38
+ }
39
+
40
+ test("test10") {
41
+ assertEquals(Main.maxEnergyBoost(List(28, 20, 57, 73, 56, 9, 35, 8, 57, 55, 7, 83, 43, 60, 30, 87, 32, 92, 94, 57, 60, 85, 70, 69, 31, 101, 33, 103, 103, 53, 15, 57, 78, 5, 3, 21, 6, 96, 76, 68, 16, 5, 50, 84, 9, 48, 105, 19, 77, 28, 18, 87, 89, 2, 8, 35, 19, 3, 22, 42, 95, 55, 96, 7, 30, 32, 60, 94, 62, 64, 93, 9, 15, 33),List(92, 62, 55, 100, 51, 23, 17, 18, 94, 57, 58, 68, 70, 82, 88, 58, 19, 5, 80, 103, 27, 37, 55, 67, 15, 32, 34, 12, 43, 92, 14, 18, 28, 90, 54, 83, 33, 26, 35, 18, 66, 83, 53, 54, 99, 103, 47, 9, 62, 95, 97, 20, 67, 5, 20, 104, 22, 61, 105, 98, 10, 7, 57, 72, 36, 98, 67, 95, 75, 64, 22, 88, 16, 75)), 4474)
42
+ }
43
+
44
+ }
maximum_frequency_after_subarray_operation/haskell_tests/Main.hs ADDED
The diff for this file is too large to render. See raw diff
 
maximum_frequency_after_subarray_operation/java_tests/Main.java ADDED
@@ -0,0 +1,21 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+ import static org.junit.jupiter.api.Assertions.*;
3
+ import org.junit.jupiter.api.Test;
4
+ import java.util.List;
5
+ import java.util.Arrays;
6
+ import java.util.ArrayList;
7
+ public class Main {
8
+ //Program start
9
+
10
+ //Program end
11
+
12
+ @Test
13
+ public void test1() {
14
+ assertEquals(2, maxFrequency(new ArrayList<>(Arrays.asList(1,2,3,4,5,6)), 1));
15
+ }
16
+ @Test
17
+ public void test2() {
18
+ assertEquals(4, maxFrequency(new ArrayList<>(Arrays.asList(10,2,3,4,5,5,4,3,2,2)), 10));
19
+ }
20
+
21
+ }
maximum_frequency_after_subarray_operation/meta.json ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:c5c81134e561437b45d3d86712097dc85ec649bc9c1e2b1a76cd826297dc9e93
3
+ size 13712041
maximum_frequency_after_subarray_operation/ocaml_tests/main.ml ADDED
The diff for this file is too large to render. See raw diff
 
maximum_frequency_after_subarray_operation/scala_tests/MySuite.scala ADDED
The diff for this file is too large to render. See raw diff
 
maximum_frequency_of_an_element_after_performing_operations_i/haskell_tests/Main.hs ADDED
The diff for this file is too large to render. See raw diff
 
maximum_frequency_of_an_element_after_performing_operations_i/java_tests/Main.java ADDED
@@ -0,0 +1,21 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+ import static org.junit.jupiter.api.Assertions.*;
3
+ import org.junit.jupiter.api.Test;
4
+ import java.util.List;
5
+ import java.util.Arrays;
6
+ import java.util.ArrayList;
7
+ public class Main {
8
+ //Program start
9
+
10
+ //Program end
11
+
12
+ @Test
13
+ public void test1() {
14
+ assertEquals(2, maxFrequency(new ArrayList<>(Arrays.asList(1,4,5)), 1, 2));
15
+ }
16
+ @Test
17
+ public void test2() {
18
+ assertEquals(2, maxFrequency(new ArrayList<>(Arrays.asList(5,11,20,20)), 5, 1));
19
+ }
20
+
21
+ }