Skip to content

Commit 518f4d7

Browse files
committed
- problems calibration
- Sum Lists 2 - moved to medium difficulty
1 parent b78acb5 commit 518f4d7

File tree

3 files changed

+2
-2
lines changed

3 files changed

+2
-2
lines changed

ProblemsStore/00000000000.xd

81 Bytes
Binary file not shown.

gradle/versioning.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
//noinspection GroovyAssignabilityCheck
22
version = new ProjectVersion(
3-
'1', '0', '16', System.env.TRAVIS_BUILD_NUMBER
3+
'1', '0', '17', System.env.TRAVIS_BUILD_NUMBER
44
)
55

66
println "Version number: " + version

problems.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
{"id":"repeated-elements","title":"Repeated Elements","description":"Write a method `findDuplicates` to find the repeated or duplicate elements in an array. This method should return a list of repeated integers in a string with the elements sorted in ascending order.\r\n\r\n### Example\r\n\r\n* `[2,5,7,11,15,11,15]` -> `'[11, 15]'`\r\n* `[2,5,7]` -> `'[]'`","timeLimit":1,"memoryLimit":32,"level":2,"func":{"name":"findDuplicates","returnStatement":{"type":"java.lang.String","comment":" Array of sorted numbers representing duplicates in original array"},"parameters":[{"name":"arr","type":"[I","comment":"An array of Integers"}]},"testCases":[{"input":[[2,5,7,11,15,11,15]],"output":"[11, 15]"},{"input":[[2,5,7,11,15,11,2,4,5]],"output":"[2, 5, 11]"},{"input":[[2,5,7,11,15,4]],"output":"[]"},{"input":[[7,5,2,2,5,7,7,7,2,2,5,5]],"output":"[2, 5, 7]"},{"input":[[]],"output":"[]"}]},
99
{"id":"reverse-list","title":"Reverse Linked List","description":"Given a singly linked list, write a method `reverseList` to reverse the list and return new head.\r\n\r\n### Examples\r\n\r\n* `1->2->3->4->5->6` -> `6->5->4->3->2->1`","timeLimit":1,"memoryLimit":32,"level":2,"func":{"name":"reverseList","returnStatement":{"type":"com.jalgoarena.type.ListNode","comment":" Reversed linked list"},"parameters":[{"name":"head","type":"com.jalgoarena.type.ListNode","comment":"Linked List head"}]},"testCases":[{"input":[[1,2,3,4,5,6]],"output":[6,5,4,3,2,1]},{"input":[[1]],"output":[1]},{"input":[[1,2]],"output":[2,1]},{"input":[[2,2]],"output":[2,2]},{"input":[null],"output":null}]},
1010
{"id":"binary-representation","title":"Binary Representation","description":"Write a method `computeBinary` to compute the binary representation of an integer. The method should return a string with 1s and 0s. Use the minimum number of binary digits needed for representation (truncate unnecessary 0s).\n\n**Note**: using java framework to solve it is forbidden - you have to code it by yourself.\n\n### Example\n\n* `6` -> `'110'`\n* `5` -> `'101'`","timeLimit":2,"memoryLimit":32,"level":2,"func":{"name":"computeBinary","returnStatement":{"type":"java.lang.String","comment":" Binary representation"},"parameters":[{"name":"val","type":"java.lang.Integer","comment":"Input number"}]},"testCases":[{"input":[5],"output":"101"},{"input":[6],"output":"110"},{"input":[-5],"output":"11111111111111111111111111111011"},{"input":[2147483647],"output":"1111111111111111111111111111111"},{"input":[0],"output":"0"},{"input":[10],"output":"1010"},{"input":[15],"output":"1111"},{"input":[52],"output":"110100"},{"input":[1],"output":"1"}]},
11-
{"id":"sum-lists-2","title":"Sum Lists 2","description":"You have two numbers represented by a linked list, where each node contains a single digit. The digits are stored in forward order, such that the 1's digit is at the tail of the list. Write method `addLists` that adds the two numbers and returns the sum as a linked list.\r\n\r\n### Examples\r\n\r\n* `6->1->7, 2->9->5` -> `9->1->2` (617 + 295 = 912)","timeLimit":1,"memoryLimit":32,"level":3,"func":{"name":"addLists","returnStatement":{"type":"com.jalgoarena.type.ListNode","comment":" linked list node containing result of sum"},"parameters":[{"name":"l1","type":"com.jalgoarena.type.ListNode","comment":"First Linked List to add"},{"name":"l2","type":"com.jalgoarena.type.ListNode","comment":"Second Linked List to add"}]},"testCases":[{"input":[[6,1,7],[2,9,5]],"output":[9,1,2]},{"input":[[1,4,5,6,7],[1,3,9]],"output":[1,4,7,0,6]},{"input":[[1,4,5,6,7],[]],"output":[1,4,5,6,7]},{"input":[[1],[1,3,9]],"output":[1,4,0]},{"input":[[9],[1]],"output":[1,0]},{"input":[[],[]],"output":[]}]},
11+
{"id":"sum-lists-2","title":"Sum Lists 2","description":"You have two numbers represented by a linked list, where each node contains a single digit. The digits are stored in forward order, such that the 1's digit is at the tail of the list. Write method `addLists` that adds the two numbers and returns the sum as a linked list.\r\n\r\n### Examples\r\n\r\n* `6->1->7, 2->9->5` -> `9->1->2` (617 + 295 = 912)","timeLimit":1,"memoryLimit":32,"level":2,"func":{"name":"addLists","returnStatement":{"type":"com.jalgoarena.type.ListNode","comment":" linked list node containing result of sum"},"parameters":[{"name":"l1","type":"com.jalgoarena.type.ListNode","comment":"First Linked List to add"},{"name":"l2","type":"com.jalgoarena.type.ListNode","comment":"Second Linked List to add"}]},"testCases":[{"input":[[6,1,7],[2,9,5]],"output":[9,1,2]},{"input":[[1,4,5,6,7],[1,3,9]],"output":[1,4,7,0,6]},{"input":[[1,4,5,6,7],[]],"output":[1,4,5,6,7]},{"input":[[1],[1,3,9]],"output":[1,4,0]},{"input":[[9],[1]],"output":[1,0]},{"input":[[],[]],"output":[]}]},
1212
{"id":"remove-dups","title":"Remove Duplicates","description":"Write method `removeDuplicates` to remove duplicates from an unsorted linked list.\r\n\r\n### Examples\r\n\r\n* `1->2->3->4->3->3` -> `1->2->3->4`","timeLimit":1,"memoryLimit":32,"level":1,"func":{"name":"removeDuplicates","returnStatement":{"type":"com.jalgoarena.type.ListNode","comment":" Linked List with removed duplicates"},"parameters":[{"name":"node","type":"com.jalgoarena.type.ListNode","comment":"Linked List where we need to remove duplicates"}]},"testCases":[{"input":[[1,2,3,4,3,3]],"output":[1,2,3,4]},{"input":[[]],"output":[]},{"input":[[1,1,1,1]],"output":[1]},{"input":[[1,1,1,1,2,3,4,3,3]],"output":[1,2,3,4]},{"input":[[1,1,2,2,3,3,4,4,3,3]],"output":[1,2,3,4]},{"input":[[1,2,3,4,3,3,1,2,3,4,3,3,1,2,3,4,3,3,1,2,3,4,3,3,1,2,3,4,3,3,1,2,3,4,3,3,1,2,3,4,3,3,1,2,3,4,3,3,1,2,3,4,3,3,1,2,3,4,3,3,1,2,3,4,3,3,1,2,3,4,3,3,1,2,3,4,3,3,1,2,3,4,3,3]],"output":[1,2,3,4]}]},
1313
{"id":"insert-at-tail","title":"Insert Node at Tail","description":"Write a method `insertAtTail` to insert a node at the end of a singly linked list. Return the head of the modified list.\r\n\r\n### Examples\r\n\r\n* `1->2->3->4->5->6, 7` -> `1->2->3->4->5->6->7`","timeLimit":1,"memoryLimit":32,"level":1,"func":{"name":"insertAtTail","returnStatement":{"type":"com.jalgoarena.type.ListNode","comment":" New linked list"},"parameters":[{"name":"head","type":"com.jalgoarena.type.ListNode","comment":"Linked List head"},{"name":"data","type":"java.lang.Integer","comment":"New value"}]},"testCases":[{"input":[[1,2,3,4,5,6],7],"output":[1,2,3,4,5,6,7]},{"input":[[],2],"output":[2]},{"input":[[1],1],"output":[1,1]},{"input":[[5,3],5],"output":[5,3,5]}]},
1414
{"id":"word-ladder","title":"Word Ladder","description":"Given two words (start and end), and a dictionary, write a method `ladderLength` to find the length of shortest transformation sequence from start to end, such that:\r\n* Only one letter can be changed at a time\r\n* Each intermediate word must exist in the dictionary\r\n* Including first word as one transformation\r\n\r\n### Examples\r\n\r\n* `\"a\", \"c\", [\"a\",\"b\",\"c\"]` -> `2`\r\n* `\"game\", \"thee\", [\"frye\",\"heat\",\"tree\",\"thee\",\"game\",\"free\",\"hell\",\"fame\",\"faye\"]` -> `7`","timeLimit":1,"memoryLimit":3200,"level":3,"func":{"name":"ladderLength","returnStatement":{"type":"java.lang.Integer","comment":"The shortest length"},"parameters":[{"name":"begin","type":"java.lang.String","comment":"the begin word"},{"name":"end","type":"java.lang.String","comment":"the end word"},{"name":"dict","type":"java.util.HashSet","comment":"the dictionary", "generic":"String"}]},"testCases":[{"input":["a","c",["a","b","c"]],"output":2},{"input":["hot","dog",["hot","cog","dog","tot","hog","hop","pot","dot"]],"output":3},{"input":["game","thee",["frye","heat","tree","thee","game","free","hell","fame","faye"]],"output":7},{"input":["kiss","tusk",["miss","dusk","kiss","musk","tusk","diss","disk","sang","ties","muss"]],"output":5},{"input":["teach","place",["peale","wilts","place","fetch","purer","pooch","peace","poach","berra","teach","rheum","peach"]],"output":4},{"input":["ta","if",["ts","sc","ph","ca","jr","hf","to","if","ha","is","io","cf","ta"]],"output":4},{"input":["qa","sq",["si","go","se","cm","so","ph","mt","db","mb","sb","kr","ln","tm","le","av","sm","ar","ci","ca","br","ti","ba","to","ra","fa","yo","ow","sn","ya","cr","po","fe","ho","ma","re","or","rn","au","ur","rh","sr","tc","lt","lo","as","fr","nb","yb","if","pb","ge","th","pm","rb","sh","co","ga","li","ha","hz","no","bi","di","hi","qa","pi","os","uh","wm","an","me","mo","na","la","st","er","sc","ne","mn","mi","am","ex","pt","io","be","fm","ta","tb","ni","mr","pa","he","lr","sq","ye"]],"output":5},{"input":["cet","ism",["kid","tag","pup","ail","tun","woo","erg","luz","brr","gay","sip","kay","per","val","mes","ohs","now","boa","cet","pal","bar","die","war","hay","eco","pub","lob","rue","fry","lit","rex","jan","cot","bid","ali","pay","col","gum","ger","row","won","dan","rum","fad","tut","sag","yip","sui","ark","has","zip","fez","own","ump","dis","ads","max","jaw","out","btu","ana","gap","cry","led","abe","box","ore","pig","fie","toy","fat","cal","lie","noh","sew","ono","tam","flu","mgm","ply","awe","pry","tit","tie","yet","too","tax","jim","san","pan","map","ski","ova","wed","non","wac","nut","why","bye","lye","oct","old","fin","feb","chi","sap","owl","log","tod","dot","bow","fob","for","joe","ivy","fan","age","fax","hip","jib","mel","hus","sob","ifs","tab","ara","dab","jag","jar","arm","lot","tom","sax","tex","yum","pei","wen","wry","ire","irk","far","mew","wit","doe","gas","rte","ian","pot","ask","wag","hag","amy","nag","ron","soy","gin","don","tug","fay","vic","boo","nam","ave","buy","sop","but","orb","fen","paw","his","sub","bob","yea","oft","inn","rod","yam","pew","web","hod","hun","gyp","wei","wis","rob","gad","pie","mon","dog","bib","rub","ere","dig","era","cat","fox","bee","mod","day","apr","vie","nev","jam","pam","new","aye","ani","and","ibm","yap","can","pyx","tar","kin","fog","hum","pip","cup","dye","lyx","jog","nun","par","wan","fey","bus","oak","bad","ats","set","qom","vat","eat","pus","rev","axe","ion","six","ila","lao","mom","mas","pro","few","opt","poe","art","ash","oar","cap","lop","may","shy","rid","bat","sum","rim","fee","bmw","sky","maj","hue","thy","ava","rap","den","fla","auk","cox","ibo","hey","saw","vim","sec","ltd","you","its","tat","dew","eva","tog","ram","let","see","zit","maw","nix","ate","gig","rep","owe","ind","hog","eve","sam","zoo","any","dow","cod","bed","vet","ham","sis","hex","via","fir","nod","mao","aug","mum","hoe","bah","hal","keg","hew","zed","tow","gog","ass","dem","who","bet","gos","son","ear","spy","kit","boy","due","sen","oaf","mix","hep","fur","ada","bin","nil","mia","ewe","hit","fix","sad","rib","eye","hop","haw","wax","mid","tad","ken","wad","rye","pap","bog","gut","ito","woe","our","ado","sin","mad","ray","hon","roy","dip","hen","iva","lug","asp","hui","yak","bay","poi","yep","bun","try","lad","elm","nat","wyo","gym","dug","toe","dee","wig","sly","rip","geo","cog","pas","zen","odd","nan","lay","pod","fit","hem","joy","bum","rio","yon","dec","leg","put","sue","dim","pet","yaw","nub","bit","bur","sid","sun","oil","red","doc","moe","caw","eel","dix","cub","end","gem","off","yew","hug","pop","tub","sgt","lid","pun","ton","sol","din","yup","jab","pea","bug","gag","mil","jig","hub","low","did","tin","get","gte","sox","lei","mig","fig","lon","use","ban","flo","nov","jut","bag","mir","sty","lap","two","ins","con","ant","net","tux","ode","stu","mug","cad","nap","gun","fop","tot","sow","sal","sic","ted","wot","del","imp","cob","way","ann","tan","mci","job","wet","ism","err","him","all","pad","hah","hie","aim","ike","jed","ego","mac","baa","min","com","ill","was","cab","ago","ina","big","ilk","gal","tap","duh","ola","ran","lab","top","gob","hot","ora","tia","kip","han","met","hut","she","sac","fed","goo","tee","ell","not","act","gil","rut","ala","ape","rig","cid","god","duo","lin","aid","gel","awl","lag","elf","liz","ref","aha","fib","oho","tho","her","nor","ace","adz","fun","ned","coo","win","tao","coy","van","man","pit","guy","foe","hid","mai","sup","jay","hob","mow","jot","are","pol","arc","lax","aft","alb","len","air","pug","pox","vow","got","meg","zoe","amp","ale","bud","gee","pin","dun","pat","ten","mob"]],"output":11}]},

0 commit comments

Comments
 (0)