├── Contest └── Find Google │ └── code.java ├── Core CS ├── Algorithms │ ├── Implementation │ │ ├── Angry Professor │ │ │ ├── angry-professor-English.pdf │ │ │ ├── code.cpp │ │ │ ├── code.cs │ │ │ ├── code.java │ │ │ ├── code.js │ │ │ ├── code.kt │ │ │ └── code.py3 │ │ ├── Append and Delete │ │ │ ├── AppendAndDelete.cs │ │ │ ├── append-and-delete-English.pdf │ │ │ ├── appendAndDelete.cpp │ │ │ ├── code.java │ │ │ ├── code.kt │ │ │ └── code.py3 │ │ ├── Apple and Orange │ │ │ ├── 1474218925-f2a791d52c-Appleandorange2.png │ │ │ ├── AppleAndOrange.cs │ │ │ ├── appleAndOrange.cpp │ │ │ ├── appleAndOrange.java │ │ │ ├── appleAndOrange.js │ │ │ ├── appleAndOrange.kt │ │ │ ├── appleAndOrange.py3 │ │ │ ├── appleAndOrange.scala │ │ │ └── readme.md │ │ ├── Beautiful Days at the Movies │ │ │ ├── beautiful-days-at-the-movies-English.pdf │ │ │ ├── code.cpp │ │ │ ├── code.cs │ │ │ ├── code.java │ │ │ └── code.py3 │ │ ├── Between Two Sets │ │ │ ├── BetweenTwoSets.cs │ │ │ ├── betweenTwoSets.cpp │ │ │ ├── betweenTwoSets.java │ │ │ ├── betweenTwoSets.js │ │ │ ├── betweenTwoSets.kt │ │ │ ├── betweenTwoSets.py3 │ │ │ ├── betweenTwoSets.scala │ │ │ └── readme.md │ │ ├── Bill Division │ │ │ ├── BillDivision.cs │ │ │ ├── billDivision.cpp │ │ │ ├── billDivision.java │ │ │ ├── billDivision.js │ │ │ ├── billDivision.kt │ │ │ ├── billDivision.py3 │ │ │ ├── billDivision.scala │ │ │ └── readme.md │ │ ├── Breaking the Records │ │ │ ├── breakingTheRecords.cpp │ │ │ ├── breakingTheRecords.cs │ │ │ ├── breakingTheRecords.java │ │ │ ├── breakingTheRecords.js │ │ │ ├── breakingTheRecords.kt │ │ │ ├── breakingTheRecords.py3 │ │ │ ├── breakingTheRecords.scala │ │ │ └── readme.md │ │ ├── Cats and a Mouse │ │ │ ├── cats-and-a-mouse-English.pdf │ │ │ ├── code.cpp │ │ │ ├── code.cs │ │ │ ├── code.java │ │ │ └── code.py3 │ │ ├── Circular Array Rotation │ │ │ ├── circular-array-rotation-English.pdf │ │ │ ├── code.cpp │ │ │ ├── code.cs │ │ │ ├── code.java │ │ │ └── code.py3 │ │ ├── Climbing the Leaderboard │ │ │ ├── climbing-the-leaderboard-English.pdf │ │ │ ├── code.cpp │ │ │ ├── code.cs │ │ │ ├── code.java │ │ │ └── code.py3 │ │ ├── Counting Valleys │ │ │ ├── CountingValleys.cs │ │ │ ├── countingValleys.cpp │ │ │ ├── countingValleys.java │ │ │ ├── countingValleys.js │ │ │ ├── countingValleys.kt │ │ │ ├── countingValleys.py3 │ │ │ ├── countingValleys.scala │ │ │ └── readme.md │ │ ├── Day of the Programmer │ │ │ ├── DayOfTheProgammer.cs │ │ │ ├── dayOfTheProgammer.cpp │ │ │ ├── dayOfTheProgammer.java │ │ │ ├── dayOfTheProgammer.js │ │ │ ├── dayOfTheProgammer.kt │ │ │ ├── dayOfTheProgammer.py3 │ │ │ ├── dayOfTheProgammer.scala │ │ │ └── readme.md │ │ ├── Designer PDF Viewer │ │ │ ├── code.cpp │ │ │ ├── code.cs │ │ │ ├── code.java │ │ │ ├── code.py3 │ │ │ └── designer-pdf-viewer-English.pdf │ │ ├── Disivible Sum Pairs │ │ │ ├── DivisibleSumPairs.cs │ │ │ ├── divisibleSumPairs.cpp │ │ │ ├── divisibleSumPairs.java │ │ │ ├── divisibleSumPairs.js │ │ │ ├── divisibleSumPairs.kt │ │ │ ├── divisibleSumPairs.py3 │ │ │ ├── divisibleSumPairs.scala │ │ │ └── readme.md │ │ ├── Drawing Book │ │ │ ├── DrawingBook.cs │ │ │ ├── drawingBook.cpp │ │ │ ├── drawingBook.java │ │ │ ├── drawingBook.js │ │ │ ├── drawingBook.kt │ │ │ ├── drawingBook.py3 │ │ │ ├── drawingBook.scala │ │ │ └── readme.md │ │ ├── Electronics Shop │ │ │ ├── ElectronicsShop.cs │ │ │ ├── electronicsShop.cpp │ │ │ ├── electronicsShop.java │ │ │ ├── electronicsShop.js │ │ │ ├── electronicsShop.kt │ │ │ ├── electronicsShop.py3 │ │ │ ├── electronicsShop.scala │ │ │ └── readme.md │ │ ├── Equalize the Array │ │ │ ├── code.c │ │ │ └── code.cpp │ │ ├── Extra long Factorials │ │ │ ├── code.cpp │ │ │ ├── code.cs │ │ │ ├── code.java │ │ │ ├── code.py3 │ │ │ └── extra-long-factorials-English.pdf │ │ ├── Find Digits │ │ │ ├── code.cpp │ │ │ ├── code.cs │ │ │ ├── code.java │ │ │ ├── code.py3 │ │ │ └── find-digits-English.pdf │ │ ├── Forming a Magic Square │ │ │ ├── code.cpp │ │ │ ├── code.cs │ │ │ ├── code.java │ │ │ ├── code.py3 │ │ │ └── magic-square-forming-English.pdf │ │ ├── Grading Students │ │ │ ├── GradingStudents.cs │ │ │ ├── gradingStudents.cpp │ │ │ ├── gradingStudents.java │ │ │ ├── gradingStudents.js │ │ │ ├── gradingStudents.kt │ │ │ ├── gradingStudents.py3 │ │ │ ├── gradingStudents.scala │ │ │ └── readme.md │ │ ├── Jumping on the Clouds- Revisited │ │ │ ├── code.cpp │ │ │ ├── code.cs │ │ │ ├── code.java │ │ │ ├── code.py3 │ │ │ └── jumping-on-the-clouds-revisited-English.pdf │ │ ├── Library Fine │ │ │ ├── LibraryFine.cs │ │ │ ├── libraryFine.cpp │ │ │ ├── libraryFine.java │ │ │ ├── libraryFine.js │ │ │ └── libraryFine.md │ │ ├── Migratory Birds │ │ │ ├── MigratoryBirds.cs │ │ │ ├── migratoryBirds.cpp │ │ │ ├── migratoryBirds.java │ │ │ ├── migratoryBirds.js │ │ │ ├── migratoryBirds.kt │ │ │ ├── migratoryBirds.py3 │ │ │ ├── migratoryBirds.scala │ │ │ └── readme.md │ │ ├── Number Line Jumps │ │ │ ├── NumberLineJumps.cs │ │ │ ├── numberLineJumps.cpp │ │ │ ├── numberLineJumps.java │ │ │ ├── numberLineJumps.js │ │ │ ├── numberLineJumps.kt │ │ │ ├── numberLineJumps.py3 │ │ │ ├── numberLineJumps.scala │ │ │ └── readme.md │ │ ├── Picking Numbers │ │ │ ├── code.cpp │ │ │ ├── code.cs │ │ │ ├── code.java │ │ │ ├── code.py3 │ │ │ └── picking-numbers-English.pdf │ │ ├── Sales by Match │ │ │ ├── SalesByMatch.cs │ │ │ ├── readme.md │ │ │ ├── salesByMatch.cpp │ │ │ ├── salesByMatch.java │ │ │ ├── salesByMatch.js │ │ │ ├── salesByMatch.kt │ │ │ ├── salesByMatch.py3 │ │ │ └── salesByMatch.scala │ │ ├── Save the Prisoner │ │ │ ├── code.cpp │ │ │ ├── code.cs │ │ │ ├── code.java │ │ │ ├── code.py3 │ │ │ └── save-the-prisoner-English.pdf │ │ ├── Sequence Equation │ │ │ ├── code.cpp │ │ │ ├── code.cs │ │ │ ├── code.java │ │ │ └── code.py3 │ │ ├── Sub-array Division │ │ │ ├── SubarrayDivision.cs │ │ │ ├── readme.md │ │ │ ├── subarrayDivision.cpp │ │ │ ├── subarrayDivision.java │ │ │ ├── subarrayDivision.js │ │ │ ├── subarrayDivision.kt │ │ │ ├── subarrayDivision.py3 │ │ │ └── subarrayDivision.scala │ │ ├── The Hurdle Race │ │ │ ├── code.cpp │ │ │ ├── code.cs │ │ │ ├── code.java │ │ │ └── code.py3 │ │ ├── Utopian Tree │ │ │ ├── code.cpp │ │ │ ├── code.cs │ │ │ ├── code.java │ │ │ ├── code.py3 │ │ │ └── utopian-tree-English.pdf │ │ ├── Viral Advertising │ │ │ ├── code.cpp │ │ │ ├── code.cs │ │ │ ├── code.java │ │ │ ├── code.py3 │ │ │ └── strange-advertising-English.pdf │ │ └── readme.md │ ├── Warmup │ │ ├── A Very Big Sum │ │ │ ├── AVeryBigSum.cs │ │ │ ├── aVeryBigSum.cpp │ │ │ ├── aVeryBigSum.java │ │ │ ├── aVeryBigSum.js │ │ │ ├── aVeryBigSum.kt │ │ │ ├── aVeryBigSum.py3 │ │ │ ├── aVeryBigSum.scala │ │ │ └── readme.md │ │ ├── Birthday Cake Candles │ │ │ ├── BirthdayCakeCandles.cs │ │ │ ├── birthdayCakeCandles.cpp │ │ │ ├── birthdayCakeCandles.java │ │ │ ├── birthdayCakeCandles.js │ │ │ ├── birthdayCakeCandles.kt │ │ │ ├── birthdayCakeCandles.py │ │ │ ├── birthdayCakeCandles.py3 │ │ │ ├── birthdayCakeCandles.scala │ │ │ └── readme.md │ │ ├── Compare the Triplets │ │ │ ├── CompareTheTriplets.cs │ │ │ ├── compareTheTriplets.cpp │ │ │ ├── compareTheTriplets.java │ │ │ ├── compareTheTriplets.js │ │ │ ├── compareTheTriplets.kt │ │ │ ├── compareTheTriplets.py3 │ │ │ ├── compareTheTriplets.scala │ │ │ └── readme.md │ │ ├── Diagonal Difference │ │ │ ├── DiagonalDiffernce.cs │ │ │ ├── diagonalDifference.cpp │ │ │ ├── diagonalDifference.java │ │ │ ├── diagonalDifference.js │ │ │ ├── diagonalDifference.kt │ │ │ ├── diagonalDifference.py3 │ │ │ ├── diagonalDifference.scala │ │ │ └── readme.md │ │ ├── Mini-Max Sum │ │ │ ├── MiniMaxSum.cs │ │ │ ├── miniMaxSum.cpp │ │ │ ├── miniMaxSum.java │ │ │ ├── miniMaxSum.js │ │ │ ├── miniMaxSum.kt │ │ │ ├── miniMaxSum.py │ │ │ ├── miniMaxSum.py3 │ │ │ ├── miniMaxSum.scala │ │ │ └── readme.md │ │ ├── Plus Minus │ │ │ ├── PlusMinus.cs │ │ │ ├── plusMinus.cpp │ │ │ ├── plusMinus.java │ │ │ ├── plusMinus.js │ │ │ ├── plusMinus.kt │ │ │ ├── plusMinus.py3 │ │ │ ├── plusMinus.scala │ │ │ └── readme.md │ │ ├── Simple Array Sum │ │ │ ├── SimpleArraySum.cs │ │ │ ├── readme.md │ │ │ ├── simpleArraySum.cpp │ │ │ ├── simpleArraySum.java │ │ │ ├── simpleArraySum.js │ │ │ ├── simpleArraySum.kt │ │ │ ├── simpleArraySum.py3 │ │ │ └── simpleArraySum.scala │ │ ├── Solve Me First │ │ │ ├── SolveMeFirst.cs │ │ │ ├── readme.md │ │ │ ├── solveMeFirst.cpp │ │ │ ├── solveMeFirst.java │ │ │ ├── solveMeFirst.js │ │ │ ├── solveMeFirst.kt │ │ │ ├── solveMeFirst.py3 │ │ │ └── solveMeFirst.scala │ │ ├── Staircase │ │ │ ├── Staircase.cs │ │ │ ├── readme.md │ │ │ ├── staircase.cpp │ │ │ ├── staircase.java │ │ │ ├── staircase.js │ │ │ ├── staircase.kt │ │ │ ├── staircase.py3 │ │ │ └── staircase.scala │ │ ├── Time Conversion │ │ │ ├── TimeConversion.cs │ │ │ ├── readme.md │ │ │ ├── timeConversion.cpp │ │ │ ├── timeConversion.java │ │ │ ├── timeConversion.js │ │ │ ├── timeConversion.kt │ │ │ ├── timeConversion.py3 │ │ │ └── timeConversion.scala │ │ └── readme.md │ └── readme.md ├── Data Structure │ ├── Arrays │ │ ├── 2D Array - DS │ │ │ ├── 2d-array-English.pdf │ │ │ ├── HourglassSum.cs │ │ │ ├── hourglassSum.cpp │ │ │ ├── hourglassSum.java │ │ │ ├── hourglassSum.js │ │ │ ├── hourglassSum.kt │ │ │ ├── hourglassSum.py3 │ │ │ └── hourglassSum.scala │ │ ├── Arrays - DS │ │ │ ├── ReserveArray.cs │ │ │ ├── arrays-ds-English.pdf │ │ │ ├── arraysDS.md │ │ │ ├── reverseArray.cpp │ │ │ ├── reverseArray.java │ │ │ ├── reverseArray.js │ │ │ ├── reverseArray.kt │ │ │ ├── reverseArray.py3 │ │ │ └── reverseArray.scala │ │ ├── Dynamic Array │ │ │ ├── DynamicArray.cs │ │ │ ├── dynamicArray.cpp │ │ │ ├── dynamicArray.java │ │ │ ├── dynamicArray.js │ │ │ ├── dynamicArray.kt │ │ │ ├── dynamicArray.py3 │ │ │ └── dynamicArray.scala │ │ └── README.md │ ├── Balanced Trees │ │ └── Self Balancing Tree │ │ │ └── code.cpp │ ├── Linked Lists │ │ └── Print the Elements of a Linked List │ │ │ ├── code.cpp │ │ │ ├── code.cs │ │ │ ├── code.java │ │ │ ├── code.js │ │ │ └── code.py3 │ ├── README.md │ └── Trees │ │ └── Tree- Preorder Traversal │ │ ├── code.cpp │ │ ├── code.cs │ │ ├── code.java │ │ ├── code.js │ │ └── code.py3 ├── Mathematics │ └── README.md └── readme.md ├── Language Proficiency ├── C │ ├── Array and Strings │ │ ├── 1D Arrays in C │ │ │ ├── 1D_Arrays_in_C.c │ │ │ └── 1d-arrays-in-c-English.pdf │ │ ├── Array Reversal │ │ │ ├── Array_Reversal.c │ │ │ └── reverse-array-c-English.pdf │ │ ├── Digit Frequency │ │ │ ├── Digit_Frequency.c │ │ │ └── frequency-of-digits-1-English.pdf │ │ ├── Dynamic Array in C │ │ │ ├── Dynamic_Array_in_C.c │ │ │ ├── Students_Marks_Sum.c │ │ │ └── dynamic-array-in-c-English.pdf │ │ └── Printing Tokens │ │ │ ├── Printing_Token.c │ │ │ └── printing-tokens--English.pdf │ ├── Conditionals and Loops │ │ ├── Bitwise Operators │ │ │ ├── Bitwise_Operators_in_C.c │ │ │ └── bitwise-operators-in-c-English.pdf │ │ ├── Conditional Statements in C │ │ │ ├── Conditional_Statements_in_C.c │ │ │ └── conditional-statements-in-c-English.pdf │ │ ├── For Loop in C │ │ │ ├── For_Loop_in_C.c │ │ │ └── for-loop-in-c-English.pdf │ │ ├── Printing Patterns using Loops │ │ │ ├── Printing_Patterns_using_Loops.c │ │ │ └── printing-pattern-2-English.pdf │ │ └── Sum of Digits of a Five Digit Number │ │ │ ├── Sum_of_Digits_of_a_Five_Digit_Number.c │ │ │ ├── input00.txt │ │ │ ├── output00.txt │ │ │ └── sum-of-digits-of-a-five-digit-number-English.pdf │ ├── Functions │ │ ├── Calculate the Nth term │ │ │ ├── Calculate_the_Nth_term.c │ │ │ └── recursion-in-c-English.pdf │ │ ├── Permutations of Strings │ │ │ └── permutations-of-strings-English.pdf │ │ ├── Querying the Document │ │ │ └── queryingTheDocument.c │ │ ├── Sorting Array of Strings │ │ │ ├── Sorting_Array_of_Strings.c │ │ │ └── sorting-array-of-strings-English.pdf │ │ └── Students Marks Sum │ │ │ ├── Students_Marks_Sum.c │ │ │ └── students-marks-sum-English.pdf │ ├── Introduction │ │ ├── Functions in C │ │ │ ├── Functions-in-c-English.pdf │ │ │ └── functions_in_C.c │ │ ├── Hello World in C │ │ │ ├── Hello_World_in_C.c │ │ │ ├── hello-world-c-English.pdf │ │ │ ├── input00.txt │ │ │ └── output00.txt │ │ ├── Playing with Characters │ │ │ ├── Playing_with_Characters.c │ │ │ ├── input00.txt │ │ │ ├── output00.txt │ │ │ └── playing-with-characters-English.pdf │ │ ├── Pointers in C │ │ │ ├── Pointers_in_C.c │ │ │ └── pointer-in-c-English.pdf │ │ └── Sum and Difference of Two Numbers │ │ │ ├── Sum_and_Difference_of_Two_Numbers.c │ │ │ ├── input00.txt │ │ │ ├── output00.txt │ │ │ └── sum-numbers-c-English.pdf │ └── Structs and Enums │ │ ├── Boxes through a Tunnel │ │ └── boxesThroughATunnel.c │ │ ├── Post Transition │ │ └── postTransition.c │ │ ├── Small Triangles, Large Triangles │ │ └── smallTrianglesLargeTriangles.c │ │ └── Structuring the Document │ │ └── structuringTheDocument.c ├── Cpp │ ├── Classes │ │ ├── Abstract Classes - Polymorphism │ │ │ ├── abstract-classes-polymorphism-English.pdf │ │ │ ├── abstractClassesPolymorphism.cpp │ │ │ └── abstractClassesPolymorphism.md │ │ ├── Box It │ │ │ ├── box-it-English.pdf │ │ │ ├── boxIt.cpp │ │ │ └── boxIt.md │ │ ├── Class │ │ │ ├── c-tutorial-class-English.pdf │ │ │ ├── class.cpp │ │ │ └── class.md │ │ ├── Classes and Objects │ │ │ ├── classes-objects-English.pdf │ │ │ ├── classesAndObjects.cpp │ │ │ └── classesAndObjects.md │ │ ├── Exceptional Server │ │ │ ├── exceptional-server-English.pdf │ │ │ ├── exceptionalServer.cpp │ │ │ └── exceptionalServer.md │ │ ├── Inherited Code │ │ │ ├── inherited-code-English.pdf │ │ │ ├── inheritedCode.cpp │ │ │ └── inheritedCode.md │ │ ├── README.md │ │ ├── Structs │ │ │ ├── c-tutorial-struct-English.pdf │ │ │ ├── structs.cpp │ │ │ └── structs.md │ │ └── Virtual Functions │ │ │ ├── virtual-functions-English.pdf │ │ │ ├── virtualFunctions.cpp │ │ │ └── virtualFunctions.md │ ├── Debugging │ │ ├── Cpp exception handling │ │ │ ├── cpp-exception-handling-English.pdf │ │ │ ├── cppExceptionHandling.cpp │ │ │ └── cppExceptionHandling.md │ │ ├── Debugging.md │ │ ├── Hotel Prices │ │ │ ├── hotel-prices-English.pdf │ │ │ ├── hotelPrices.cpp │ │ │ └── hotelPrices.md │ │ ├── Messages Order │ │ │ ├── messages-order-English.pdf │ │ │ ├── messagesOrder.cpp │ │ │ └── messagesOrder.md │ │ └── Overloading Ostream Operator │ │ │ ├── overloading-ostream-operator-English.pdf │ │ │ ├── overloadingOstreamOperator.cpp │ │ │ └── overloadingOstreamOperator.md │ ├── Inheritance │ │ ├── Accessing Inherited Functions │ │ │ ├── accessing-inherited-functions-English.pdf │ │ │ ├── accessingInheritedFunctions.cpp │ │ │ └── accessingInheritedFunctions.md │ │ ├── Inheritance Introduction │ │ │ ├── inheritance-introduction-English.pdf │ │ │ ├── inheritanceIntroduction.cpp │ │ │ └── inheritanceIntroduction.md │ │ ├── Inheritance.md │ │ ├── Magic Spells │ │ │ ├── magic-spells-English.pdf │ │ │ ├── magicSpells.cpp │ │ │ └── magicSpells.md │ │ ├── Multi Level Inheritance │ │ │ ├── multi-level-inheritance-cpp-English.pdf │ │ │ ├── multiLevelInheritance.cpp │ │ │ └── multiLevelInheritance.md │ │ └── Rectangle Area │ │ │ ├── rectangle-area-English.pdf │ │ │ ├── rectangleArea.cpp │ │ │ └── rectangleArea.md │ ├── Introduction │ │ ├── Arrays Introduction │ │ │ ├── arrays-introduction-English.pdf │ │ │ ├── arraysIntroduction.cpp │ │ │ └── arraysIntroduction.md │ │ ├── Basic Data Types │ │ │ ├── basicDataTypes.cpp │ │ │ ├── basicDataTypes.md │ │ │ └── c-tutorial-basic-data-types-English.pdf │ │ ├── Conditional Statements │ │ │ ├── c-tutorial-conditional-if-else-English.pdf │ │ │ ├── conditionalStatements.cpp │ │ │ └── conditionalStatements.md │ │ ├── For Loop │ │ │ ├── c-tutorial-for-loop-English.pdf │ │ │ ├── forLoop.cpp │ │ │ └── forLoop.md │ │ ├── Functions │ │ │ ├── c-tutorial-functions-English.pdf │ │ │ ├── functions.cpp │ │ │ └── functions.md │ │ ├── Input and Output │ │ │ ├── cpp-input-and-output-English.pdf │ │ │ ├── inputAndOutput.cpp │ │ │ └── inputAndOutput.md │ │ ├── Pointer │ │ │ ├── c-tutorial-pointer-English.pdf │ │ │ ├── pointer.cpp │ │ │ └── pointer.md │ │ ├── Say Hello World With Cpp │ │ │ ├── cpp-hello-world-English.pdf │ │ │ ├── sayHelloWorldWithCpp.cpp │ │ │ └── sayHelloWorldWithCpp.md │ │ ├── Variable Sized Arrays │ │ │ ├── variable-sized-arrays-English.pdf │ │ │ ├── variableSizedArray.md │ │ │ └── variableSizedArrays.cpp │ │ └── introduction.md │ ├── Other Concepts │ │ ├── Attending Workshops │ │ │ ├── attending-workshops-English.pdf │ │ │ ├── attendingWorkshops.cpp │ │ │ └── attendingWorkshops.md │ │ ├── Bit Array │ │ │ ├── bitArray.cpp │ │ │ ├── bitArray.md │ │ │ └── bitset-1-English.pdf │ │ ├── Cpp Class Template Specialization │ │ │ ├── cpp-class-template-specialization-English.pdf │ │ │ ├── cppClassTemplateSpecialization.cpp │ │ │ └── cppClassTemplateSpecialization.md │ │ ├── Cpp Class Templates │ │ │ ├── c-class-templates-English.pdf │ │ │ └── cppClassTemplates.cpp │ │ ├── Cpp Variadics │ │ │ ├── cpp-variadics-English.pdf │ │ │ ├── cppVariadics.cpp │ │ │ └── cppVariadics.md │ │ ├── Operator Overloading │ │ │ ├── operator-overloading-English.pdf │ │ │ └── operatorOverloading.cpp │ │ ├── OtherConcepts.md │ │ ├── Overload Operators │ │ │ ├── operator-overloading-English.pdf │ │ │ └── overloadOperators.cpp │ │ └── Preprocessor Solutions │ │ │ ├── preprocessor-solution-English.pdf │ │ │ └── preprocessorSolutions.cpp │ ├── STL │ │ ├── Deque-STL │ │ │ ├── deque-stl-English.pdf │ │ │ ├── dequeSTL.cpp │ │ │ └── dequeSTL.md │ │ ├── Lower Bound-STL │ │ │ ├── cpp-lower-bound-English.pdf │ │ │ ├── lowerBoundSTL.cpp │ │ │ └── lowerBoundSTL.md │ │ ├── Maps-STL │ │ │ ├── cpp-maps-English.pdf │ │ │ ├── mapsSTL.cpp │ │ │ └── mapsSTL.md │ │ ├── Print Pretty │ │ │ ├── prettyprint-English.pdf │ │ │ ├── printPretty.cpp │ │ │ └── printPretty.md │ │ ├── STL.md │ │ ├── Sets-STL │ │ │ ├── SetsSTL.md │ │ │ ├── cpp-sets-English.pdf │ │ │ └── setsSTL.cpp │ │ ├── Vector-Erase │ │ │ ├── vector-erase-English.pdf │ │ │ ├── vectorErase.cpp │ │ │ └── vectorErase.md │ │ └── Vector-Sort │ │ │ ├── vector-sort-English.pdf │ │ │ ├── vectorSort.cpp │ │ │ └── vectorSort.md │ └── Strings │ │ ├── Attribute Parser │ │ ├── attribute-parser-English.pdf │ │ ├── attributeParser.cpp │ │ └── attributeParser.md │ │ ├── StringStream │ │ ├── c-tutorial-stringstream-English.pdf │ │ ├── stringStream.cpp │ │ └── stringStream.md │ │ ├── Strings │ │ ├── c-tutorial-strings-English.pdf │ │ ├── strings.cpp │ │ └── strings.md │ │ └── strings.md ├── Java │ ├── Introduction │ │ ├── Java Currency Formatter │ │ │ ├── code.java │ │ │ └── java-currency-formatter-English.pdf │ │ ├── Java Datatypes │ │ │ ├── code.java │ │ │ └── java-datatypes-English.pdf │ │ ├── Java Date and Time │ │ │ ├── code.java │ │ │ └── java-date-and-time-English.pdf │ │ ├── Java End-of-file │ │ │ ├── code.java │ │ │ └── java-end-of-file-English.pdf │ │ ├── Java If-Else │ │ │ ├── code.java │ │ │ └── java-if-else-English.pdf │ │ ├── Java Int to String │ │ │ ├── code.java │ │ │ └── java-int-to-string-English.pdf │ │ ├── Java Loops I │ │ │ ├── code.java │ │ │ └── java-loops-i-English.pdf │ │ ├── Java Loops II │ │ │ ├── code.java │ │ │ └── java-loops-English.pdf │ │ ├── Java Output Formatting │ │ │ ├── code.java │ │ │ └── java-output-formatting-English.pdf │ │ ├── Java Static Initializer Block │ │ │ ├── code.java │ │ │ └── java-static-initializer-block-English.pdf │ │ ├── Java Stdin and Stdout I │ │ │ ├── code.java │ │ │ └── java-stdin-and-stdout-1-English.pdf │ │ ├── Java Stdin and Stdout II │ │ │ ├── code.java │ │ │ └── java-stdin-stdout-English.pdf │ │ └── Welcome to Java │ │ │ ├── code.java │ │ │ └── welcome-to-java-English.pdf │ └── Strings │ │ ├── Java Anagrams │ │ ├── code.java │ │ └── java-anagrams-English.pdf │ │ ├── Java Regex 2 - Duplicate Words │ │ ├── code.java │ │ └── duplicate-word-English.pdf │ │ ├── Java Regex │ │ ├── code.java │ │ └── java-regex-English.pdf │ │ ├── Java String Reverse │ │ ├── code.java │ │ └── java-string-reverse-English.pdf │ │ ├── Java String Tokens │ │ ├── code.java │ │ └── java-string-tokens-English.pdf │ │ ├── Java Strings Introduction │ │ ├── code.java │ │ └── java-strings-introduction-English.pdf │ │ ├── Java Substring Comparison │ │ ├── code.java │ │ └── java-string-compare-English.pdf │ │ ├── Java Substring │ │ ├── code.java │ │ └── java-substring-English.pdf │ │ ├── Pattern Syntax Checker │ │ ├── code.java │ │ └── pattern-syntax-checker-English.pdf │ │ ├── Tag Content Extractor │ │ ├── code.java │ │ └── tag-content-extractor-English.pdf │ │ └── Valid Username Regular Expression │ │ ├── code.java │ │ └── valid-username-checker-English.pdf ├── Linux Shell │ ├── Arrays in Bash │ │ ├── concatenate_an_array.sh │ │ ├── count_elements.sh │ │ ├── display_elements.sh │ │ ├── filter_an_array.sh │ │ ├── lonely_integer.sh │ │ ├── read_in_an_array.sh │ │ ├── remove_first_capital_letter.sh │ │ └── slice_an_array.sh │ ├── Bash │ │ ├── a_personalised_echo.sh │ │ ├── arithmetic_operations.sh │ │ ├── comparing_numbers.sh │ │ ├── compute_the_average.sh │ │ ├── conditionals.sh │ │ ├── lets_echo.md │ │ ├── lets_echo.sh │ │ ├── looping_and_skipping.sh │ │ ├── looping_with_numbers.sh │ │ ├── more_on_conditionals.sh │ │ └── the_world_of_numbers.sh │ ├── Grep Sed Awk │ │ ├── awk-1.sh │ │ ├── awk-2.sh │ │ ├── awk-3.sh │ │ ├── awk-4.sh │ │ ├── grep-2.sh │ │ ├── grep-3.sh │ │ ├── grep-a.sh │ │ ├── grep-b.sh │ │ ├── sed-2.sh │ │ ├── sed-3.sh │ │ ├── sed-4.sh │ │ └── sed-5.sh │ └── Text Processing │ │ ├── cut-1.sh │ │ ├── cut-2.1.sh │ │ ├── cut-2.sh │ │ ├── cut-3.sh │ │ ├── cut-4.sh │ │ ├── cut-5.sh │ │ ├── cut-6.sh │ │ ├── cut-7.sh │ │ ├── cut-8.sh │ │ ├── cut-9.sh │ │ ├── head_of_a_text_file-1.sh │ │ ├── head_of_a_text_file-2.sh │ │ ├── middle_of_a_text_file.sh │ │ ├── paste-1.sh │ │ ├── paste-2.sh │ │ ├── paste-4.sh │ │ ├── sort-1.sh │ │ ├── sort-2.sh │ │ ├── sort-3.sh │ │ ├── sort-4.sh │ │ ├── sort-5.sh │ │ ├── sort-6.sh │ │ ├── tail_of_a_text_file-1.sh │ │ ├── tail_of_a_text_file-2.sh │ │ ├── tr-1.sh │ │ ├── tr-2.sh │ │ ├── tr-3.sh │ │ ├── uniq-1.sh │ │ ├── uniq-2.sh │ │ └── uniq-3.sh └── Python │ ├── Basic Data Types │ ├── find_second_max_num.md │ ├── find_second_max_num.py3 │ ├── list_comprehensions.md │ └── list_comprehensions.py3 │ ├── Date and Time │ ├── calendar_module.py3 │ └── time_delta.py3 │ └── Introduction │ ├── arithmetic_operators.md │ ├── arithmetic_operators.py3 │ ├── helloworld.md │ ├── helloworld.py3 │ ├── loops.md │ ├── loops.py3 │ ├── print_function.md │ ├── print_function.py3 │ ├── py_division.md │ ├── py_division.py3 │ ├── py_if-else.md │ ├── py_if-else.py3 │ ├── write_a_function.md │ └── write_a_function.py3 ├── README.md ├── Specialized Skills ├── Artificial Intelligence │ └── botSavesPrincess.py3 ├── Databases │ ├── Indexes │ │ ├── Index Architecture Types │ │ │ └── readme.md │ │ ├── Indexes - 2 │ │ │ └── readme.md │ │ ├── Indexes - 3 │ │ │ └── readme.md │ │ └── Indexes - 4 │ │ │ └── readme.md │ ├── NoSQL - XML, MapReduce │ │ └── Map Reduce Advanced - Count number of friends │ │ │ ├── code.py │ │ │ └── map-reduce-advanced-count-number-of-friends-English.pdf │ ├── OLAP │ │ ├── OLAP Cube Metadata │ │ │ └── readme.md │ │ ├── OLAP Name(s) │ │ │ └── readme.md │ │ ├── OLAP Operation Types │ │ │ └── readme.md │ │ ├── OLAP Operations - 1 │ │ │ └── readme.md │ │ ├── OLAP Operations - 2 │ │ │ └── readme.md │ │ ├── Olap Performance │ │ │ └── readme.md │ │ └── The Total View │ │ │ └── readme.md │ ├── Relational Algebra │ │ ├── Basics of Sets and Relations #1 │ │ │ ├── basics-of-sets-and-relational-algebra-1-English.pdf │ │ │ └── code.txt │ │ ├── Basics of Sets and Relations #2 │ │ │ ├── basics-of-sets-and-relational-algebra-2-English.pdf │ │ │ └── code.txt │ │ ├── Basics of Sets and Relations #3 │ │ │ ├── basics-of-sets-and-relational-algebra-3-English.pdf │ │ │ └── code.txt │ │ ├── Basics of Sets and Relations #4 │ │ │ ├── basics-of-sets-and-relational-algebra-4-English.pdf │ │ │ └── code.txt │ │ ├── Basics of Sets and Relations #5 │ │ │ ├── basics-of-sets-and-relational-algebra-5-English.pdf │ │ │ └── code.txt │ │ ├── Basics of Sets and Relations #6 │ │ │ ├── basics-of-sets-and-relational-algebra-6-English.pdf │ │ │ └── code.txt │ │ ├── Basics of Sets and Relations #7 │ │ │ ├── basics-of-sets-and-relational-algebra-7-English.pdf │ │ │ └── code.txt │ │ ├── Database Query Languages │ │ │ └── readme.md │ │ ├── Prodedural Language │ │ │ └── readme.md │ │ ├── Relational Algebra - 3 │ │ │ └── readme.md │ │ ├── Relational Algebra - 4 │ │ │ └── readme.md │ │ ├── Relations - 1 │ │ │ └── readme.md │ │ └── Relations - 2 │ │ │ └── readme.md │ └── Set and Algebra │ │ ├── Databases - Differences │ │ ├── code.txt │ │ └── databases-differences-English.pdf │ │ ├── Databases - Keys │ │ ├── code.txt │ │ └── databases-keys-English.pdf │ │ ├── Databases - Natural Joins │ │ ├── code.txt │ │ └── databases-natural-joins-English.pdf │ │ └── Databases - Relational Calculus │ │ ├── code.txt │ │ └── databases-relational-calculus-English.pdf ├── Functional Programming │ └── Introduction │ │ ├── Area Under Curves and Volume of Revolving a Curve │ │ ├── area-under-curves-and-volume-of-revolving-a-curv-English.pdf │ │ ├── code.fs │ │ └── code.scala │ │ ├── Array of N Elements │ │ ├── code.fs │ │ ├── code.scala │ │ └── fp-array-of-n-elements-English.pdf │ │ ├── Compute the Area of a Polygon │ │ ├── code.fs │ │ ├── code.scala │ │ └── lambda-march-compute-the-area-of-a-polygon-English.pdf │ │ ├── Compute the Perimeter of a Polygon │ │ ├── code.fs │ │ ├── code.scala │ │ └── lambda-march-compute-the-perimeter-of-a-polygon-English.pdf │ │ ├── Evaluating e^x │ │ ├── code.fs │ │ ├── code.scala │ │ └── eval-ex-English.pdf │ │ ├── Filter Array │ │ ├── code.fs │ │ ├── code.scala │ │ └── fp-filter-array-English.pdf │ │ ├── Filter Positions in a List │ │ ├── code.fs │ │ ├── code.scala │ │ └── fp-filter-positions-in-a-list-English.pdf │ │ ├── Functions or Not │ │ ├── code.fs │ │ ├── code.scala │ │ └── functions-or-not-English.pdf │ │ ├── Hello World N Times │ │ ├── code.fs │ │ ├── code.hs │ │ ├── code.scala │ │ └── fp-hello-world-n-times-English.pdf │ │ ├── Hello World │ │ ├── code.fs │ │ ├── code.hs │ │ ├── code.scala │ │ └── fp-hello-world-English.pdf │ │ ├── Lambda Calculus - Evaluating Expressions 1 │ │ ├── code.txt │ │ └── lambda-calculus-getting-started-English.pdf │ │ ├── Lambda Calculus - Evaluating Expressions 2 │ │ ├── code.txt │ │ └── lambda-calculus-understanding-the-syntax-English.pdf │ │ ├── Lambda Calculus - Evaluating Expressions 3 │ │ ├── code.txt │ │ └── lambda-calculus-evaluate-the-expression-English.pdf │ │ ├── Lambda Calculus - Evaluating Expressions 4 │ │ ├── code.txt │ │ └── lambda-calculus-evaluate-the-expression-1-English.pdf │ │ ├── Lambda Calculus - Evaluating Expressions 5 │ │ ├── code.txt │ │ └── lambda-calculus-evaluate-the-expression-2-English.pdf │ │ ├── Lambda Calculus - Reductions 1 │ │ ├── code.txt │ │ └── lambda-calculus-reductions-1-English.pdf │ │ ├── Lambda Calculus - Reductions 2 │ │ ├── code.txt │ │ └── lambda-calculus-reductions-2-English.pdf │ │ ├── Lambda Calculus - Reductions 3 │ │ ├── code.txt │ │ └── lambda-calculus-reductions-3-English.pdf │ │ ├── Lambda Calculus - Reductions 4 │ │ ├── code.txt │ │ └── lambda-calculus-reductions-4-English.pdf │ │ ├── List Length │ │ ├── code.fs │ │ ├── code.scala │ │ └── fp-list-length-English.pdf │ │ ├── List Replication │ │ ├── code.fs │ │ ├── code.hs │ │ ├── code.scala │ │ └── fp-list-replication-English.pdf │ │ ├── Reverse a List │ │ ├── code.fs │ │ ├── code.scala │ │ └── fp-reverse-a-list-English.pdf │ │ ├── Solve Me First FP │ │ ├── code.fs │ │ ├── code.hs │ │ ├── code.scala │ │ └── fp-solve-me-first-English.pdf │ │ ├── Sum of Odd Elements │ │ ├── code.fs │ │ ├── code.scala │ │ └── fp-sum-of-odd-elements-English.pdf │ │ └── Update List │ │ ├── code.fs │ │ ├── code.scala │ │ └── fp-update-list-English.pdf ├── README.md └── SQL │ └── Basic Select │ └── Revising the Select Query I │ ├── code.sql │ └── revising-the-select-query-English.pdf └── Tutorials ├── 10 Days of Javascript ├── Day 0 - Data Types │ ├── code.js │ └── js10-data-types-English.pdf ├── Day 0 - Hello, World! │ ├── code.js │ └── js10-hello-world-English.pdf ├── Day 1 - Arithmetic Operators │ ├── code.js │ └── js10-arithmetic-operators-English.pdf ├── Day 1 - Functions │ ├── code.js │ └── js10-function-English.pdf ├── Day 1 - Let and Const │ ├── code.js │ └── js10-let-and-const-English.pdf ├── Day 2 - Conditional Statements If-Else │ ├── code.js │ └── js10-if-else-English.pdf ├── Day 2 - Conditional Statements Switch │ ├── code.js │ └── js10-switch-English.pdf ├── Day 2 - Loops │ ├── code.js │ └── js10-loops-English.pdf ├── Day 3 - Arrays │ ├── code.js │ └── js10-arrays-English.pdf ├── Day 3 - Throw │ ├── code.js │ └── js10-throw-English.pdf ├── Day 3 - Try, Catch, and Finally │ ├── code.js │ └── js10-try-catch-and-finally-English.pdf ├── Day 4 - Classes │ ├── code.js │ └── js10-class-English.pdf ├── Day 4 - Count Objects │ ├── code.js │ └── js10-count-objects-English.pdf ├── Day 4 - Create a Rectangle Object │ ├── code.js │ └── js10-objects-English.pdf ├── Day 5 - Arrow Functions │ ├── code.js │ └── js10-arrows-English.pdf ├── Day 5 - Inheritance │ ├── code.js │ └── js10-inheritance-English.pdf ├── Day 5 - Template Literals │ ├── code.js │ └── js10-template-literals-English.pdf ├── Day 6 - Bitwise Operators │ ├── code.js │ └── js10-bitwise-English.pdf ├── Day 6 - Javascript Dates │ ├── code.js │ └── js10-date-English.pdf ├── Day 7 - Regular Expression I │ ├── code.js │ └── js10-regexp-1-English.pdf ├── Day 7 - Regular Expression II │ ├── code.js │ └── js10-regexp-2-English.pdf ├── Day 7 - Regular Expression III │ ├── code.js │ └── js10-regexp-3-English.pdf ├── Day 8 - Buttons Container │ ├── css │ │ └── buttonsGrid.css │ ├── index.html │ └── js │ │ └── buttonsGrid.js └── Day 8 - Create a Button │ ├── css │ └── button.css │ ├── index.html │ ├── js │ └── button.js │ └── js10-create-a-button-English.pdf ├── Interview Preparation Kit ├── Arrays │ ├── 2D Array - DS │ │ ├── 2d-array-English.pdf │ │ ├── code.c │ │ ├── code.cpp │ │ ├── code.cs │ │ ├── code.java │ │ ├── code.js │ │ └── code.py3 │ ├── Array Manipulation │ │ ├── code.c │ │ ├── code.cpp │ │ ├── code.cs │ │ ├── code.java │ │ ├── code.js │ │ ├── code.py3 │ │ └── crush-English.pdf │ ├── Arrays Left Rotation │ │ ├── code.c │ │ ├── code.cpp │ │ ├── code.cs │ │ ├── code.java │ │ ├── code.js │ │ ├── code.py3 │ │ └── ctci-array-left-rotation-English.pdf │ ├── Minimum Swaps 2 │ │ ├── code.c │ │ ├── code.cpp │ │ ├── code.cs │ │ ├── code.java │ │ ├── code.js │ │ ├── code.py3 │ │ └── minimum-swaps-2-English.pdf │ └── New Year Chaos │ │ ├── code.c │ │ ├── code.cpp │ │ ├── code.cs │ │ ├── code.java │ │ ├── code.js │ │ ├── code.py3 │ │ └── new-year-chaos-English.pdf ├── Dictionaries and Hashmaps │ ├── Count Triplets │ │ ├── code.c │ │ ├── code.cpp │ │ ├── code.cs │ │ ├── code.java │ │ ├── code.js │ │ └── code.py3 │ ├── Frequency Queries │ │ ├── code.c │ │ ├── code.cpp │ │ ├── code.cs │ │ ├── code.java │ │ ├── code.js │ │ └── code.py3 │ ├── Hash Tables Ransom Note │ │ ├── code.c │ │ ├── code.cpp │ │ ├── code.cs │ │ ├── code.java │ │ ├── code.js │ │ ├── code.py3 │ │ └── ctci-ransom-note-English.pdf │ ├── Sherlock and Anagrams │ │ ├── code.c │ │ ├── code.cpp │ │ ├── code.cs │ │ ├── code.java │ │ ├── code.js │ │ ├── code.py3 │ │ └── sherlock-and-anagrams-English.pdf │ └── Two Strings │ │ ├── code.c │ │ ├── code.cpp │ │ ├── code.cs │ │ ├── code.java │ │ ├── code.js │ │ ├── code.py3 │ │ └── two-strings-English.pdf ├── README.md ├── Sorting │ ├── Fraudulent Activity Notifications │ │ ├── code.c │ │ ├── code.cpp │ │ ├── code.cs │ │ ├── code.java │ │ ├── code.js │ │ ├── code.py3 │ │ └── fraudulent-activity-notifications-English.pdf │ ├── Mark and Toys │ │ ├── code.c │ │ ├── code.cpp │ │ ├── code.cs │ │ ├── code.java │ │ ├── code.js │ │ ├── code.py3 │ │ └── mark-and-toys-English.pdf │ ├── Merge Sort Counting Inversions │ │ ├── code.c │ │ ├── code.cpp │ │ ├── code.cs │ │ ├── code.java │ │ ├── code.js │ │ └── code.py3 │ ├── Sorting Bubble Sort │ │ ├── code.c │ │ ├── code.cpp │ │ ├── code.cs │ │ ├── code.java │ │ ├── code.js │ │ ├── code.py3 │ │ └── ctci-bubble-sort-English.pdf │ └── Sorting Comparator │ │ ├── code.c │ │ ├── code.cpp │ │ ├── code.cs │ │ ├── code.java │ │ ├── code.js │ │ ├── code.py3 │ │ └── ctci-comparator-sorting-English.pdf ├── String Manipulation │ └── Strings Making Anagrams │ │ ├── code.c │ │ └── code.cpp └── Warm-up Challenges │ ├── Counting Valleys │ ├── code.c │ ├── code.cpp │ ├── code.cs │ ├── code.java │ ├── code.js │ ├── code.py3 │ └── counting-valleys-English.pdf │ ├── Jumping on the Clouds │ ├── code.c │ ├── code.cpp │ ├── code.cs │ ├── code.java │ ├── code.js │ ├── code.py3 │ └── jumping-on-the-clouds-English.pdf │ ├── README.md │ ├── Repeated String │ ├── code.c │ ├── code.cpp │ ├── code.cs │ ├── code.java │ ├── code.js │ ├── code.py3 │ └── repeated-string-English.pdf │ └── Sock Merchant │ ├── code.c │ ├── code.cpp │ ├── code.cs │ ├── code.java │ ├── code.js │ ├── code.py3 │ └── sock-merchant-English.pdf └── README.md /Core CS/Algorithms/Implementation/Angry Professor/angry-professor-English.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Lintik/hackerrank/2fa4fceded1706676da8c87606e2ac0283feae4d/Core CS/Algorithms/Implementation/Angry Professor/angry-professor-English.pdf -------------------------------------------------------------------------------- /Core CS/Algorithms/Implementation/Angry Professor/code.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | using namespace std; 3 | 4 | int main(){ 5 | int t; 6 | cin >> t; 7 | for(int a0 = 0; a0 < t; a0++){ 8 | int n; 9 | int k; 10 | cin >> n >> k; 11 | vector a(n); 12 | int c = 0; 13 | for(int a_i = 0;a_i < n;a_i++){ 14 | cin >> a[a_i]; 15 | if(a[a_i] <= 0) c++; 16 | } 17 | if(c >= k) cout << "NO" << endl; 18 | else cout << "YES" << endl; 19 | } 20 | return 0; 21 | } 22 | -------------------------------------------------------------------------------- /Core CS/Algorithms/Implementation/Angry Professor/code.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Lintik/hackerrank/2fa4fceded1706676da8c87606e2ac0283feae4d/Core CS/Algorithms/Implementation/Angry Professor/code.js -------------------------------------------------------------------------------- /Core CS/Algorithms/Implementation/Angry Professor/code.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Lintik/hackerrank/2fa4fceded1706676da8c87606e2ac0283feae4d/Core CS/Algorithms/Implementation/Angry Professor/code.kt -------------------------------------------------------------------------------- /Core CS/Algorithms/Implementation/Angry Professor/code.py3: -------------------------------------------------------------------------------- 1 | #!/bin/python3 2 | 3 | import sys 4 | 5 | 6 | t = int(input().strip()) 7 | for a0 in range(t): 8 | n,k = input().strip().split(' ') 9 | n,k = [int(n),int(k)] 10 | a = [int(a_temp) for a_temp in input().strip().split(' ')] 11 | c = list(filter(lambda x: x <= 0, a)) 12 | print("NO") if len(c) >= k else print("YES") 13 | -------------------------------------------------------------------------------- /Core CS/Algorithms/Implementation/Append and Delete/AppendAndDelete.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Lintik/hackerrank/2fa4fceded1706676da8c87606e2ac0283feae4d/Core CS/Algorithms/Implementation/Append and Delete/AppendAndDelete.cs -------------------------------------------------------------------------------- /Core CS/Algorithms/Implementation/Append and Delete/append-and-delete-English.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Lintik/hackerrank/2fa4fceded1706676da8c87606e2ac0283feae4d/Core CS/Algorithms/Implementation/Append and Delete/append-and-delete-English.pdf -------------------------------------------------------------------------------- /Core CS/Algorithms/Implementation/Append and Delete/code.java: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /Core CS/Algorithms/Implementation/Append and Delete/code.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Lintik/hackerrank/2fa4fceded1706676da8c87606e2ac0283feae4d/Core CS/Algorithms/Implementation/Append and Delete/code.kt -------------------------------------------------------------------------------- /Core CS/Algorithms/Implementation/Append and Delete/code.py3: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /Core CS/Algorithms/Implementation/Apple and Orange/1474218925-f2a791d52c-Appleandorange2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Lintik/hackerrank/2fa4fceded1706676da8c87606e2ac0283feae4d/Core CS/Algorithms/Implementation/Apple and Orange/1474218925-f2a791d52c-Appleandorange2.png -------------------------------------------------------------------------------- /Core CS/Algorithms/Implementation/Apple and Orange/appleAndOrange.py3: -------------------------------------------------------------------------------- 1 | import sys 2 | 3 | s,t = input().strip().split(' ') 4 | s,t = [int(s),int(t)] 5 | a,b = input().strip().split(' ') 6 | a,b = [int(a),int(b)] 7 | m,n = input().strip().split(' ') 8 | m,n = [int(m),int(n)] 9 | apple = [int(apple_temp) for apple_temp in input().strip().split(' ')] 10 | orange = [int(orange_temp) for orange_temp in input().strip().split(' ')] 11 | c = 0 12 | d = 0 13 | for i in apple: 14 | if(a+i >= s and a+i <= t):c+=1 15 | for i in orange: 16 | if(b+i >= s and b+i <= t):d+=1 17 | print(c) 18 | print(d) 19 | -------------------------------------------------------------------------------- /Core CS/Algorithms/Implementation/Beautiful Days at the Movies/beautiful-days-at-the-movies-English.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Lintik/hackerrank/2fa4fceded1706676da8c87606e2ac0283feae4d/Core CS/Algorithms/Implementation/Beautiful Days at the Movies/beautiful-days-at-the-movies-English.pdf -------------------------------------------------------------------------------- /Core CS/Algorithms/Implementation/Beautiful Days at the Movies/code.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | using namespace std; 3 | 4 | int main() { 5 | int m; 6 | cin >> m; 7 | int n; 8 | cin >> n; 9 | int k; 10 | cin >> k; 11 | int c = 0; 12 | for(int i = m; i <= n;i++){ 13 | int r = 0; 14 | int temp = i; 15 | while(temp){ 16 | r *= 10; 17 | r += temp % 10; 18 | temp /= 10; 19 | } 20 | if(abs(i - r) % k == 0) c++; 21 | } 22 | cout << c; 23 | } 24 | -------------------------------------------------------------------------------- /Core CS/Algorithms/Implementation/Beautiful Days at the Movies/code.py3: -------------------------------------------------------------------------------- 1 | a = [int(a_temp) for a_temp in input().strip().split(' ')] 2 | c = 0 3 | for k in range(a[0], a[1] + 1): 4 | r = 0 5 | temp = k 6 | while(temp > 0): 7 | r *= 10 8 | r += temp % 10 9 | temp //= 10 10 | if(abs(k - r) % a[2] == 0): c+=1 11 | print(c) 12 | -------------------------------------------------------------------------------- /Core CS/Algorithms/Implementation/Bill Division/billDivision.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | using namespace std; 3 | 4 | void bonAppetit(int k, int b, vector ar) { 5 | int s = 0 - ar[k]; 6 | for(int a: ar) 7 | s += a; 8 | 9 | if(b - s/2 == 0) 10 | cout << "Bon Appetit"; 11 | else 12 | cout << b - s/2; 13 | } 14 | 15 | int main() { 16 | int n; 17 | int k; 18 | cin >> n >> k; 19 | vector ar(n); 20 | for(int ar_i = 0; ar_i < n; ar_i++){ 21 | cin >> ar[ar_i]; 22 | } 23 | int b; 24 | cin >> b; 25 | bonAppetit(k, b, ar); 26 | } 27 | -------------------------------------------------------------------------------- /Core CS/Algorithms/Implementation/Bill Division/billDivision.py3: -------------------------------------------------------------------------------- 1 | import sys 2 | 3 | def bonAppetit(k, b, ar): 4 | s = sum(ar) - ar[k] 5 | 6 | if(b-s/2 == 0): 7 | print("Bon Appetit") 8 | else: 9 | print(int(b - s/2)) 10 | 11 | n, k = input().strip().split(' ') 12 | n, k = [int(n), int(k)] 13 | ar = list(map(int, input().strip().split(' '))) 14 | b = int(input().strip()) 15 | bonAppetit(k, b, ar) 16 | -------------------------------------------------------------------------------- /Core CS/Algorithms/Implementation/Breaking the Records/breakingTheRecords.py3: -------------------------------------------------------------------------------- 1 | #!/bin/python3 2 | 3 | import sys 4 | 5 | def getRecord(s): 6 | maxc = minc = 0 7 | m = n = s[0] 8 | 9 | for i in range(1,len(s)): 10 | if ms[i]: 14 | n=s[i] 15 | minc+=1 16 | 17 | return [maxc,minc] 18 | 19 | n = int(input().strip()) 20 | s = list(map(int, input().strip().split(' '))) 21 | result = getRecord(s) 22 | print (" ".join(map(str, result))) 23 | -------------------------------------------------------------------------------- /Core CS/Algorithms/Implementation/Cats and a Mouse/cats-and-a-mouse-English.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Lintik/hackerrank/2fa4fceded1706676da8c87606e2ac0283feae4d/Core CS/Algorithms/Implementation/Cats and a Mouse/cats-and-a-mouse-English.pdf -------------------------------------------------------------------------------- /Core CS/Algorithms/Implementation/Cats and a Mouse/code.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | using namespace std; 3 | 4 | int main() { 5 | int q; 6 | cin >> q; 7 | for(int a0 = 0; a0 < q; a0++){ 8 | int x; 9 | int y; 10 | int z; 11 | cin >> x >> y >> z; 12 | 13 | int xz = abs(x - z); 14 | int yz = abs(y - z); 15 | if(xz > yz) cout << "Cat B"; 16 | else if(xz < yz) cout << "Cat A"; 17 | else cout << "Mouse C"; 18 | cout << endl; 19 | } 20 | 21 | return 0; 22 | } 23 | -------------------------------------------------------------------------------- /Core CS/Algorithms/Implementation/Cats and a Mouse/code.py3: -------------------------------------------------------------------------------- 1 | #!/bin/python3 2 | 3 | import sys 4 | 5 | 6 | q = int(input().strip()) 7 | for a0 in range(q): 8 | x,y,z = input().strip().split(' ') 9 | x,y,z = [int(x),int(y),int(z)] 10 | 11 | xy = abs(x - z) 12 | yz = abs(y - z) 13 | if xy > yz: print("Cat B") 14 | elif xy < yz: print("Cat A") 15 | else: print("Mouse C") 16 | -------------------------------------------------------------------------------- /Core CS/Algorithms/Implementation/Circular Array Rotation/circular-array-rotation-English.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Lintik/hackerrank/2fa4fceded1706676da8c87606e2ac0283feae4d/Core CS/Algorithms/Implementation/Circular Array Rotation/circular-array-rotation-English.pdf -------------------------------------------------------------------------------- /Core CS/Algorithms/Implementation/Circular Array Rotation/code.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | using namespace std; 3 | 4 | int main() { 5 | int n, k, q; 6 | cin >> n; 7 | cin >> k; 8 | cin >> q; 9 | vector a(n); 10 | vector b(n); 11 | vector m(q); 12 | for(int i = 0;i < n; i++) 13 | cin >> a[i]; 14 | for(int i = 0;i < n;i++){ 15 | b[i] = a[(i + (n-(k%n)))%n]; 16 | } 17 | for(int i = 0;i < q;i++){ 18 | int j; 19 | cin >> j; 20 | cout << b[j] << endl; 21 | } 22 | return 0; 23 | } 24 | -------------------------------------------------------------------------------- /Core CS/Algorithms/Implementation/Circular Array Rotation/code.py3: -------------------------------------------------------------------------------- 1 | #!/bin/python3 2 | 3 | import sys 4 | 5 | n,k,q = input().strip().split(' ') 6 | n,k,q = [int(n),int(k),int(q)] 7 | a = [int(a_temp) for a_temp in input().strip().split(' ')] 8 | for a0 in range(q): 9 | m = int(input().strip()) 10 | print(a[(m + (n-(k%n)))%n]) 11 | -------------------------------------------------------------------------------- /Core CS/Algorithms/Implementation/Climbing the Leaderboard/climbing-the-leaderboard-English.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Lintik/hackerrank/2fa4fceded1706676da8c87606e2ac0283feae4d/Core CS/Algorithms/Implementation/Climbing the Leaderboard/climbing-the-leaderboard-English.pdf -------------------------------------------------------------------------------- /Core CS/Algorithms/Implementation/Counting Valleys/countingValleys.py3: -------------------------------------------------------------------------------- 1 | import sys 2 | 3 | def solve(n, ar): 4 | depth = t = 0 5 | for i in ar: 6 | if i == 'U': 7 | depth += 1 8 | if depth == 0: 9 | t += 1 10 | else: 11 | depth -= 1 12 | return t 13 | 14 | n =int(input()) 15 | ar =input() 16 | 17 | result = solve(n,ar) 18 | print(result) 19 | -------------------------------------------------------------------------------- /Core CS/Algorithms/Implementation/Day of the Programmer/dayOfTheProgammer.py3: -------------------------------------------------------------------------------- 1 | #!/bin/python3 2 | 3 | import sys 4 | 5 | def dayOfTheProgrammer(year): 6 | mon7 = 215 7 | feb = 0#days in february 8 | if(year < 1918): #julian 9 | feb = 28 if year%4>0 else 29 10 | elif(year > 1918): #gregorian 11 | feb = 29 if (not (year%400 >0)) or year%100>0 and (not(year%4>0)) else 28 12 | else: #1918 13 | feb = 15 14 | feb = 256 - (feb + mon7) 15 | return str(feb) + ".09." + str(year) 16 | 17 | year = int(input().strip()) 18 | result = dayOfTheProgrammer(year) 19 | print(result) 20 | -------------------------------------------------------------------------------- /Core CS/Algorithms/Implementation/Designer PDF Viewer/code.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | using namespace std; 3 | 4 | int main() { 5 | vector h(26); 6 | for(int i = 0; i < 26; i++) 7 | cin >> h[i]; 8 | string word; 9 | cin >> word; 10 | int m = 0; 11 | for(char letter: word){ 12 | if(h[letter - 'a'] > m) 13 | m = h[letter - 'a']; 14 | } 15 | cout << word.length() * m; 16 | return 0; 17 | } 18 | -------------------------------------------------------------------------------- /Core CS/Algorithms/Implementation/Designer PDF Viewer/code.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.IO; 4 | using System.Linq; 5 | class Solution { 6 | 7 | static void Main(String[] args) { 8 | string[] h_temp = Console.ReadLine().Split(' '); 9 | int[] h = Array.ConvertAll(h_temp,Int32.Parse); 10 | string word = Console.ReadLine(); 11 | int m = 0; 12 | for(int i = 0; i < word.Length;i++){ 13 | if(h[word[i] - 'a'] > m) 14 | m = h[word[i] - 'a']; 15 | } 16 | Console.WriteLine(m * word.Length); 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /Core CS/Algorithms/Implementation/Designer PDF Viewer/code.py3: -------------------------------------------------------------------------------- 1 | #!/bin/python3 2 | 3 | import sys 4 | 5 | h = list(map(int, input().strip().split(' '))) 6 | word = input().strip() 7 | m = 0 8 | for letter in word: 9 | if(h[ord(letter) - 97] > m): 10 | m = h[ord(letter) - 97] 11 | 12 | print(len(word) * m) 13 | -------------------------------------------------------------------------------- /Core CS/Algorithms/Implementation/Designer PDF Viewer/designer-pdf-viewer-English.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Lintik/hackerrank/2fa4fceded1706676da8c87606e2ac0283feae4d/Core CS/Algorithms/Implementation/Designer PDF Viewer/designer-pdf-viewer-English.pdf -------------------------------------------------------------------------------- /Core CS/Algorithms/Implementation/Disivible Sum Pairs/divisibleSumPairs.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | using namespace std; 4 | 5 | int divisibleSumPairs(int n, int k, vector ar) { 6 | int c=0; 7 | for(int i=0;i> n >> k; 17 | vector ar(n); 18 | for(int ar_i = 0; ar_i < n; ar_i++){ 19 | cin >> ar[ar_i]; 20 | } 21 | int result = divisibleSumPairs(n, k, ar); 22 | cout << result << endl; 23 | return 0; 24 | } 25 | -------------------------------------------------------------------------------- /Core CS/Algorithms/Implementation/Disivible Sum Pairs/divisibleSumPairs.py3: -------------------------------------------------------------------------------- 1 | #!/bin/python3 2 | 3 | import sys 4 | 5 | def divisibleSumPairs(n, k, ar): 6 | c=0 7 | for i in range(0,n-1): 8 | for j in range(i+1,n): 9 | if((ar[i]+ar[j]) % k == 0): c+=1 10 | return c 11 | 12 | n, k = input().strip().split(' ') 13 | n, k = [int(n), int(k)] 14 | ar = list(map(int, input().strip().split(' '))) 15 | result = divisibleSumPairs(n, k, ar) 16 | print(result) 17 | -------------------------------------------------------------------------------- /Core CS/Algorithms/Implementation/Drawing Book/DrawingBook.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.IO; 4 | using System.Linq; 5 | class Solution { 6 | 7 | static int solve(int n, int p){ 8 | return Math.Min(p/2,n/2-p/2); 9 | } 10 | 11 | static void Main(String[] args) { 12 | int n = Convert.ToInt32(Console.ReadLine()); 13 | int p = Convert.ToInt32(Console.ReadLine()); 14 | int result = solve(n, p); 15 | Console.WriteLine(result); 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /Core CS/Algorithms/Implementation/Drawing Book/drawingBook.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | using namespace std; 4 | 5 | int solve(int n, int p){ 6 | return min(p/2,n/2-p/2); 7 | } 8 | 9 | int main() { 10 | int n; 11 | cin >> n; 12 | int p; 13 | cin >> p; 14 | int result = solve(n, p); 15 | cout << result << endl; 16 | return 0; 17 | } 18 | -------------------------------------------------------------------------------- /Core CS/Algorithms/Implementation/Drawing Book/drawingBook.java: -------------------------------------------------------------------------------- 1 | import java.io.*; 2 | import java.util.*; 3 | import java.text.*; 4 | import java.math.*; 5 | 6 | public class Solution { 7 | 8 | static int solve(int n, int p){ 9 | return Math.min(p/2,n/2-p/2); 10 | } 11 | 12 | public static void main(String[] args) { 13 | Scanner in = new Scanner(System.in); 14 | int n = in.nextInt(); 15 | int p = in.nextInt(); 16 | int result = solve(n, p); 17 | System.out.println(result); 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /Core CS/Algorithms/Implementation/Drawing Book/drawingBook.kt: -------------------------------------------------------------------------------- 1 | import java.io.* 2 | import java.text.* 3 | import java.util.* 4 | import kotlin.math.* 5 | 6 | fun pageCount(n: Int, p: Int): Int { 7 | return min(p/2,n/2-p/2) 8 | } 9 | 10 | fun main(args: Array) { 11 | val scan = Scanner(System.`in`) 12 | 13 | val n = scan.nextLine().trim().toInt() 14 | 15 | val p = scan.nextLine().trim().toInt() 16 | 17 | val result = pageCount(n, p) 18 | 19 | println(result) 20 | } 21 | -------------------------------------------------------------------------------- /Core CS/Algorithms/Implementation/Drawing Book/drawingBook.py3: -------------------------------------------------------------------------------- 1 | #!/bin/python3 2 | 3 | import sys 4 | 5 | def solve(n, p): 6 | return min(p//2,n//2-p//2) 7 | 8 | n = int(input().strip()) 9 | p = int(input().strip()) 10 | result = solve(n, p) 11 | print(result) 12 | -------------------------------------------------------------------------------- /Core CS/Algorithms/Implementation/Drawing Book/drawingBook.scala: -------------------------------------------------------------------------------- 1 | import java.io.PrintWriter 2 | 3 | object Solution { 4 | 5 | def pageCount(n: Int, p: Int): Int = { 6 | return Array(p/2,n/2-p/2).min 7 | } 8 | 9 | def main(args: Array[String]) { 10 | val stdin = scala.io.StdIn 11 | 12 | val printWriter = new PrintWriter(sys.env("OUTPUT_PATH")) 13 | 14 | val n = stdin.readLine.trim.toInt 15 | 16 | val p = stdin.readLine.trim.toInt 17 | 18 | val result = pageCount(n, p) 19 | 20 | printWriter.println(result) 21 | 22 | printWriter.close() 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /Core CS/Algorithms/Implementation/Electronics Shop/electronicsShop.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Lintik/hackerrank/2fa4fceded1706676da8c87606e2ac0283feae4d/Core CS/Algorithms/Implementation/Electronics Shop/electronicsShop.js -------------------------------------------------------------------------------- /Core CS/Algorithms/Implementation/Electronics Shop/electronicsShop.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Lintik/hackerrank/2fa4fceded1706676da8c87606e2ac0283feae4d/Core CS/Algorithms/Implementation/Electronics Shop/electronicsShop.kt -------------------------------------------------------------------------------- /Core CS/Algorithms/Implementation/Electronics Shop/electronicsShop.scala: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Lintik/hackerrank/2fa4fceded1706676da8c87606e2ac0283feae4d/Core CS/Algorithms/Implementation/Electronics Shop/electronicsShop.scala -------------------------------------------------------------------------------- /Core CS/Algorithms/Implementation/Equalize the Array/code.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Lintik/hackerrank/2fa4fceded1706676da8c87606e2ac0283feae4d/Core CS/Algorithms/Implementation/Equalize the Array/code.c -------------------------------------------------------------------------------- /Core CS/Algorithms/Implementation/Equalize the Array/code.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | using namespace std; 3 | 4 | int findMostFrequentNumber(vector arr){ 5 | map m; 6 | int mx = 0; 7 | for(auto i: arr){ 8 | m[i] += 1; 9 | if(mx < m[i]) 10 | mx = m[i]; 11 | } 12 | return arr.size() - mx; 13 | 14 | } 15 | 16 | int main(){ 17 | int n; 18 | cin >> n; 19 | vector arr(n); 20 | for(int i = 0;i < n;i++){ 21 | cin >> arr[i]; 22 | } 23 | cout << findMostFrequentNumber(arr); 24 | return 0; 25 | } -------------------------------------------------------------------------------- /Core CS/Algorithms/Implementation/Extra long Factorials/code.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.IO; 4 | using System.Numerics; 5 | class Solution 6 | { 7 | static void Main(String[] args) 8 | { 9 | BigInteger Sum = new BigInteger(); 10 | int Factorial = Convert.ToInt32(Console.ReadLine()); 11 | Sum = 1; 12 | for (int i = 1; i < Factorial + 1; i++){ 13 | Sum *= i; 14 | } 15 | Console.WriteLine(Sum); 16 | Console.ReadLine(); 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /Core CS/Algorithms/Implementation/Extra long Factorials/code.java: -------------------------------------------------------------------------------- 1 | import java.io.*; 2 | import java.util.*; 3 | import java.text.*; 4 | import java.math.*; 5 | import java.util.regex.*; 6 | 7 | public class Solution { 8 | 9 | static BigInteger factorial(int n){ 10 | BigInteger product = BigInteger.ONE; 11 | for(int i = 2;i <= n;i++){ 12 | product = product.multiply(BigInteger.valueOf(i)); 13 | } 14 | return product; 15 | } 16 | public static void main(String[] args) { 17 | Scanner sc=new Scanner(System.in); 18 | System.out.println(factorial(sc.nextInt())); 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /Core CS/Algorithms/Implementation/Extra long Factorials/code.py3: -------------------------------------------------------------------------------- 1 | #!/bin/python3 2 | 3 | import sys 4 | 5 | n = int(input().strip()) 6 | t = n 7 | while(n > 1): 8 | t *= n - 1 9 | n -= 1 10 | 11 | print(t) 12 | -------------------------------------------------------------------------------- /Core CS/Algorithms/Implementation/Extra long Factorials/extra-long-factorials-English.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Lintik/hackerrank/2fa4fceded1706676da8c87606e2ac0283feae4d/Core CS/Algorithms/Implementation/Extra long Factorials/extra-long-factorials-English.pdf -------------------------------------------------------------------------------- /Core CS/Algorithms/Implementation/Find Digits/code.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | using namespace std; 3 | 4 | int main() { 5 | int t; 6 | cin >> t; 7 | for(int i = 0; i < t; i++){ 8 | int n; 9 | cin >> n; 10 | int r = n; 11 | int count = 0; 12 | while(r > 0){ 13 | if(r % 10 != 0 && n % (r % 10) == 0) count++; 14 | r /= 10; 15 | } 16 | cout << count << endl; 17 | } 18 | return 0; 19 | } 20 | -------------------------------------------------------------------------------- /Core CS/Algorithms/Implementation/Find Digits/code.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.IO; 4 | using System.Linq; 5 | class Solution { 6 | 7 | static void Main(String[] args) { 8 | int t = Convert.ToInt32(Console.ReadLine()); 9 | for(int a0 = 0; a0 < t; a0++){ 10 | int n = Convert.ToInt32(Console.ReadLine()); 11 | int r = n; 12 | int count = 0; 13 | while(r > 0){ 14 | if(r % 10 != 0 && n % (r % 10) == 0) count++; 15 | r /= 10; 16 | } 17 | Console.WriteLine(count); 18 | } 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /Core CS/Algorithms/Implementation/Find Digits/code.java: -------------------------------------------------------------------------------- 1 | import java.io.*; 2 | import java.util.*; 3 | 4 | public class Solution { 5 | 6 | public static void main(String[] args) { 7 | Scanner sc = new Scanner(System.in); 8 | int t = sc.nextInt(); 9 | for(int i = 0; i < t;i++){ 10 | int n = sc.nextInt(); 11 | int r = n; 12 | int count = 0; 13 | while(r > 0){ 14 | if(r % 10 != 0 && n % (r % 10) == 0) count++; 15 | r /= 10; 16 | } 17 | System.out.println(count); 18 | } 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /Core CS/Algorithms/Implementation/Find Digits/code.py3: -------------------------------------------------------------------------------- 1 | #!/bin/python3 2 | 3 | import sys 4 | 5 | t = int(input().strip()) 6 | for a0 in range(t): 7 | n = int(input().strip()) 8 | r = n 9 | count = 0 10 | while(r > 0): 11 | if(r % 10 != 0 and n % (r % 10) == 0): count+=1 12 | r = r // 10 13 | print(count) 14 | -------------------------------------------------------------------------------- /Core CS/Algorithms/Implementation/Find Digits/find-digits-English.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Lintik/hackerrank/2fa4fceded1706676da8c87606e2ac0283feae4d/Core CS/Algorithms/Implementation/Find Digits/find-digits-English.pdf -------------------------------------------------------------------------------- /Core CS/Algorithms/Implementation/Forming a Magic Square/magic-square-forming-English.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Lintik/hackerrank/2fa4fceded1706676da8c87606e2ac0283feae4d/Core CS/Algorithms/Implementation/Forming a Magic Square/magic-square-forming-English.pdf -------------------------------------------------------------------------------- /Core CS/Algorithms/Implementation/Grading Students/gradingStudents.py3: -------------------------------------------------------------------------------- 1 | #!/bin/python3 2 | 3 | import sys 4 | 5 | def gradingStudents(grades): 6 | g = [] 7 | for i in grades: 8 | if i >= 38 and i%5 > 2: 9 | g.append(i - i%5 + 5) 10 | else: 11 | g.append(i) 12 | return g 13 | 14 | n = int(input().strip()) 15 | grades = [] 16 | grades_i = 0 17 | for grades_i in range(n): 18 | grades_t = int(input().strip()) 19 | grades.append(grades_t) 20 | result = gradingStudents(grades) 21 | print ("\n".join(map(str, result))) 22 | -------------------------------------------------------------------------------- /Core CS/Algorithms/Implementation/Jumping on the Clouds- Revisited/code.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | using namespace std; 3 | 4 | int main() { 5 | int n, k, p, E; 6 | cin >> n; 7 | cin >> k; 8 | vector N(n); 9 | for(int i = 0;i < n;i++) 10 | cin >> N[i]; 11 | 12 | for(int i = 0, E = 100, p = 0; E >= 0;i++){ 13 | E--; 14 | p += k % n; 15 | p = p % n; 16 | if(N[p] == 1) E -= 2; 17 | if(p == 0){ 18 | cout << E; 19 | return 0; 20 | } 21 | } 22 | return 0; 23 | } 24 | -------------------------------------------------------------------------------- /Core CS/Algorithms/Implementation/Jumping on the Clouds- Revisited/code.py3: -------------------------------------------------------------------------------- 1 | #!/bin/python3 2 | 3 | import sys 4 | 5 | n,k = input().strip().split(' ') 6 | n,k = [int(n),int(k)] 7 | c = [int(c_temp) for c_temp in input().strip().split(' ')] 8 | E, p, i = [100, 0, 0] 9 | 10 | while(E >= 0): 11 | E-=1 12 | p += k % n 13 | p %= n 14 | if c[p] == 1: E -= 2; 15 | if(p == 0): 16 | print(E) 17 | break 18 | -------------------------------------------------------------------------------- /Core CS/Algorithms/Implementation/Jumping on the Clouds- Revisited/jumping-on-the-clouds-revisited-English.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Lintik/hackerrank/2fa4fceded1706676da8c87606e2ac0283feae4d/Core CS/Algorithms/Implementation/Jumping on the Clouds- Revisited/jumping-on-the-clouds-revisited-English.pdf -------------------------------------------------------------------------------- /Core CS/Algorithms/Implementation/Library Fine/LibraryFine.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Lintik/hackerrank/2fa4fceded1706676da8c87606e2ac0283feae4d/Core CS/Algorithms/Implementation/Library Fine/LibraryFine.cs -------------------------------------------------------------------------------- /Core CS/Algorithms/Implementation/Library Fine/libraryFine.java: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Lintik/hackerrank/2fa4fceded1706676da8c87606e2ac0283feae4d/Core CS/Algorithms/Implementation/Library Fine/libraryFine.java -------------------------------------------------------------------------------- /Core CS/Algorithms/Implementation/Library Fine/libraryFine.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Lintik/hackerrank/2fa4fceded1706676da8c87606e2ac0283feae4d/Core CS/Algorithms/Implementation/Library Fine/libraryFine.js -------------------------------------------------------------------------------- /Core CS/Algorithms/Implementation/Number Line Jumps/numberLineJumps.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | using namespace std; 3 | 4 | string numberLineJumps(int x1, int v1, int x2, int v2) { 5 | if(v2 >= v1) return "NO"; 6 | return (x2-x1)%(v1-v2) == 0? "YES":"NO"; 7 | } 8 | 9 | int main() { 10 | int x1, v1, x2, v2; 11 | cin >> x1 >> v1 >> x2 >> v2; 12 | string result = numberLineJumps(x1, v1, x2, v2); 13 | cout << result << endl; 14 | return 0; 15 | } 16 | -------------------------------------------------------------------------------- /Core CS/Algorithms/Implementation/Number Line Jumps/numberLineJumps.py3: -------------------------------------------------------------------------------- 1 | #!/bin/python3 2 | 3 | import sys 4 | 5 | def numberLineJumps(x1, v1, x2, v2): 6 | if(v2 >= v1): return "NO" 7 | if(x2-x1)%(v1-v2) == 0: return "YES" 8 | else: return "NO" 9 | 10 | 11 | x1, v1, x2, v2 = input().strip().split(' ') 12 | x1, v1, x2, v2 = [int(x1), int(v1), int(x2), int(v2)] 13 | result = numberLineJumps(x1, v1, x2, v2) 14 | print(result) 15 | -------------------------------------------------------------------------------- /Core CS/Algorithms/Implementation/Picking Numbers/picking-numbers-English.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Lintik/hackerrank/2fa4fceded1706676da8c87606e2ac0283feae4d/Core CS/Algorithms/Implementation/Picking Numbers/picking-numbers-English.pdf -------------------------------------------------------------------------------- /Core CS/Algorithms/Implementation/Sales by Match/salesByMatch.kt: -------------------------------------------------------------------------------- 1 | import java.io.* 2 | import java.text.* 3 | import java.util.* 4 | import kotlin.text.* 5 | 6 | fun sockMerchant(n: Int, ar: Array): Int { 7 | return ar.groupingBy{it}.eachCount().values.fold(0){ acc, b -> acc + b/2} 8 | } 9 | 10 | fun main(args: Array) { 11 | val scan = Scanner(System.`in`) 12 | 13 | val n = scan.nextLine().trim().toInt() 14 | 15 | val ar = scan.nextLine().split(" ").map{ it.trim().toInt() }.toTypedArray() 16 | 17 | val result = sockMerchant(n, ar) 18 | 19 | println(result) 20 | } 21 | -------------------------------------------------------------------------------- /Core CS/Algorithms/Implementation/Sales by Match/salesByMatch.py3: -------------------------------------------------------------------------------- 1 | import sys 2 | import math 3 | from collections import Counter 4 | 5 | def pair(x): 6 | return int(x/2) 7 | 8 | def sockMerchant(ar): 9 | return sum(map(pair, Counter(ar).values())) 10 | 11 | n = int(input().strip()) 12 | ar = list(map(int, input().strip().split(' '))) 13 | result = sockMerchant(ar) 14 | print(result) 15 | -------------------------------------------------------------------------------- /Core CS/Algorithms/Implementation/Save the Prisoner/code.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | using namespace std; 3 | 4 | int main() { 5 | int t; 6 | cin >> t; 7 | for(int i = 0; i < t;i++){ 8 | int n; 9 | cin >> n; 10 | int m; 11 | cin >> m; 12 | int s; 13 | cin >> s; 14 | cout << ((m + s - 2) % n) + 1 << endl; 15 | } 16 | return 0; 17 | } 18 | -------------------------------------------------------------------------------- /Core CS/Algorithms/Implementation/Save the Prisoner/code.py3: -------------------------------------------------------------------------------- 1 | #!/bin/python3 2 | 3 | import sys 4 | 5 | def saveThePrisoner(n, m, s): 6 | return (m + s - 2) % n + 1 7 | 8 | t = int(input().strip()) 9 | for a0 in range(t): 10 | n, m, s = input().strip().split(' ') 11 | n, m, s = [int(n), int(m), int(s)] 12 | result = saveThePrisoner(n, m, s) 13 | print(result) 14 | -------------------------------------------------------------------------------- /Core CS/Algorithms/Implementation/Save the Prisoner/save-the-prisoner-English.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Lintik/hackerrank/2fa4fceded1706676da8c87606e2ac0283feae4d/Core CS/Algorithms/Implementation/Save the Prisoner/save-the-prisoner-English.pdf -------------------------------------------------------------------------------- /Core CS/Algorithms/Implementation/Sequence Equation/code.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | using namespace std; 3 | 4 | int main() { 5 | int n; 6 | cin >> n; 7 | vector p_inverse(n+1); 8 | for(int i = 1; i <= n;i++){ 9 | int px; 10 | cin >> px; 11 | p_inverse[px] = i; 12 | } 13 | for (int x = 1; x <= n; x++) { 14 | int y = p_inverse[p_inverse[x]]; 15 | cout << y << endl; 16 | } 17 | return 0; 18 | } 19 | -------------------------------------------------------------------------------- /Core CS/Algorithms/Implementation/Sequence Equation/code.java: -------------------------------------------------------------------------------- 1 | import java.io.*; 2 | import java.util.*; 3 | 4 | public class Solution { 5 | public static void main(String args[] ) throws Exception { 6 | Scanner sc = new Scanner(System.in); 7 | int n = sc.nextInt(); 8 | int[] p_inverse = new int[n + 1]; 9 | for(int i = 1; i <= n;i++){ 10 | int px = sc.nextInt(); 11 | p_inverse[px] = i; 12 | } 13 | for(int i = 1; i <= n;i++){ 14 | int y = p_inverse[p_inverse[i]]; 15 | System.out.println(y); 16 | } 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /Core CS/Algorithms/Implementation/Sequence Equation/code.py3: -------------------------------------------------------------------------------- 1 | import sys 2 | n = int(input()) 3 | p = input().strip().split(' ') 4 | p = list(map(int, p)); 5 | p_inverse = [None]*(n+1) 6 | for i in range(1,n+1): 7 | p_inverse[p[i-1]] = i 8 | for i in range(1,n+1): 9 | print(p_inverse[p_inverse[i]]) 10 | -------------------------------------------------------------------------------- /Core CS/Algorithms/Implementation/Sub-array Division/subarrayDivision.py3: -------------------------------------------------------------------------------- 1 | #!/bin/python3 2 | 3 | import sys 4 | 5 | def subarrayDivision(n, s, d, m): 6 | t = c = 0 7 | for i in range(m): 8 | t+=s[i] 9 | 10 | if(t==d): 11 | c+=1 12 | 13 | for i in range(m,n): 14 | t = t - s[i-m] + s[i] 15 | if(t==d): 16 | c+=1 17 | 18 | return c 19 | 20 | n = int(input().strip()) 21 | s = list(map(int, input().strip().split(' '))) 22 | d, m = input().strip().split(' ') 23 | d, m = [int(d), int(m)] 24 | result = subarrayDivision(n, s, d, m) 25 | print(result) 26 | -------------------------------------------------------------------------------- /Core CS/Algorithms/Implementation/The Hurdle Race/code.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | using namespace std; 3 | int main() { 4 | int n; 5 | cin >> n; 6 | int p; 7 | cin >> p; 8 | vector a(n); 9 | int m = 0; 10 | for(int i = 0; i < n;i++){ 11 | cin >> a[i]; 12 | if(a[i] > m) m = a[i]; 13 | } 14 | if(m > p) 15 | cout << m - p; 16 | else 17 | cout << 0; 18 | return 0; 19 | 20 | } 21 | -------------------------------------------------------------------------------- /Core CS/Algorithms/Implementation/The Hurdle Race/code.py3: -------------------------------------------------------------------------------- 1 | #!/bin/python3 2 | 3 | import sys 4 | 5 | n,k = input().strip().split(' ') 6 | n,k = [int(n),int(k)] 7 | height = list(map(int, input().strip().split(' '))) 8 | r = max(height) - k 9 | print(r) if r > 0 else print(0) 10 | -------------------------------------------------------------------------------- /Core CS/Algorithms/Implementation/Utopian Tree/code.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | using namespace std; 3 | 4 | int main() { 5 | int n; 6 | cin >> n; 7 | vector a(n); 8 | for(int i = 0; i < n; i++){ 9 | cin >> a[i]; 10 | int m = ~(~1<<(a[i]>>1)) << a[i]%2; 11 | cout << m << endl; 12 | } 13 | return 0; 14 | } 15 | -------------------------------------------------------------------------------- /Core CS/Algorithms/Implementation/Utopian Tree/code.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.IO; 4 | using System.Linq; 5 | class Solution { 6 | 7 | static void Main(String[] args) { 8 | int t = Convert.ToInt32(Console.ReadLine()); 9 | for(int a0 = 0; a0 < t; a0++){ 10 | int n = Convert.ToInt32(Console.ReadLine()); 11 | int m = ~(~1<<(n>>1)) << n%2; 12 | Console.WriteLine(m); 13 | } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /Core CS/Algorithms/Implementation/Utopian Tree/code.java: -------------------------------------------------------------------------------- 1 | import java.io.*; 2 | import java.util.*; 3 | 4 | public class Solution { 5 | 6 | public static void main(String[] args) { 7 | Scanner sc = new Scanner(System.in); 8 | int t = sc.nextInt(); 9 | for(int i = 0; i < t;i++){ 10 | int n = sc.nextInt(); 11 | int m = ~(~1<<(n>>1)) << n%2; 12 | System.out.println(m); 13 | } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /Core CS/Algorithms/Implementation/Utopian Tree/code.py3: -------------------------------------------------------------------------------- 1 | #!/bin/python3 2 | 3 | import sys 4 | 5 | t = int(input().strip()) 6 | for a0 in range(t): 7 | n = int(input().strip()) 8 | m = ~(~1<<(n>>1)) << n%2; 9 | print(m) 10 | -------------------------------------------------------------------------------- /Core CS/Algorithms/Implementation/Utopian Tree/utopian-tree-English.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Lintik/hackerrank/2fa4fceded1706676da8c87606e2ac0283feae4d/Core CS/Algorithms/Implementation/Utopian Tree/utopian-tree-English.pdf -------------------------------------------------------------------------------- /Core CS/Algorithms/Implementation/Viral Advertising/code.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | using namespace std; 3 | 4 | int main() { 5 | int n; 6 | cin >> n; 7 | vector m(n+1); 8 | m[0] = 2; 9 | for(int i = 0; i < n - 1;i++) 10 | m[i+1] = 3*m[i]/2; 11 | int t = 0; 12 | for(int i: m) 13 | t += i; 14 | cout << t; 15 | return 0; 16 | } 17 | -------------------------------------------------------------------------------- /Core CS/Algorithms/Implementation/Viral Advertising/code.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.IO; 4 | using System.Linq; 5 | class Solution { 6 | static void Main(String[] args) { 7 | int n = Convert.ToInt32(Console.ReadLine()); 8 | int[] m = new int[n+1]; 9 | m[0] = 2; 10 | for(int i = 0; i < n - 1;i++) 11 | m[i+1] = 3*m[i]/2; 12 | 13 | Console.WriteLine(m.Sum()); 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /Core CS/Algorithms/Implementation/Viral Advertising/code.java: -------------------------------------------------------------------------------- 1 | import java.io.*; 2 | import java.util.*; 3 | 4 | public class Solution { 5 | 6 | public static void main(String[] args) { 7 | Scanner in = new Scanner(System.in); 8 | int n = in.nextInt(); 9 | int[] m = new int[n+1]; 10 | m[0] = 2; 11 | for(int i = 0; i < n - 1;i++) 12 | m[i+1] = 3*m[i]/2; 13 | System.out.println(Arrays.stream(m).sum()); 14 | in.close(); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /Core CS/Algorithms/Implementation/Viral Advertising/code.py3: -------------------------------------------------------------------------------- 1 | m = [2] 2 | for i in range(int(input())-1): 3 | m.append(int(3*m[i]/2)) 4 | print(sum(m)) 5 | -------------------------------------------------------------------------------- /Core CS/Algorithms/Implementation/Viral Advertising/strange-advertising-English.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Lintik/hackerrank/2fa4fceded1706676da8c87606e2ac0283feae4d/Core CS/Algorithms/Implementation/Viral Advertising/strange-advertising-English.pdf -------------------------------------------------------------------------------- /Core CS/Algorithms/Warmup/A Very Big Sum/AVeryBigSum.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.IO; 4 | using System.Linq; 5 | class Solution { 6 | 7 | //pass long array and sum all the elements 8 | static long aVeryBigSum(long[] ar) { 9 | return ar.Sum(); 10 | } 11 | 12 | static void Main(String[] args) { 13 | int n = Convert.ToInt32(Console.ReadLine()); 14 | string[] ar_temp = Console.ReadLine().Split(' '); 15 | long[] ar = Array.ConvertAll(ar_temp,Int64.Parse); 16 | long result = aVeryBigSum(ar); 17 | Console.WriteLine(result); 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /Core CS/Algorithms/Warmup/A Very Big Sum/aVeryBigSum.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | using namespace std; 4 | 5 | long aVeryBigSum(int n, vector ar) { 6 | // Complete this function 7 | long s = 0; 8 | for(int i=0;i> n; 16 | vector ar(n); 17 | for(int ar_i = 0; ar_i < n; ar_i++){ 18 | cin >> ar[ar_i]; 19 | } 20 | long result = aVeryBigSum(n, ar); 21 | cout << result << endl; 22 | return 0; 23 | } 24 | -------------------------------------------------------------------------------- /Core CS/Algorithms/Warmup/A Very Big Sum/aVeryBigSum.kt: -------------------------------------------------------------------------------- 1 | import java.io.* 2 | import java.util.* 3 | 4 | fun simpleArraySum(ar: Array): Long { 5 | //built in sum() 6 | //return ar.sum() 7 | 8 | //stream fold() 9 | return ar.fold(0L) { acc, e -> acc + e } 10 | } 11 | 12 | fun main(args: Array) { 13 | val scan = Scanner(System.`in`) 14 | 15 | val arCount = scan.nextLine().trim().toLong() 16 | 17 | val ar = scan.nextLine().split(" ").map{ it.trim().toLong() }.toTypedArray() 18 | 19 | val result = simpleArraySum(ar) 20 | 21 | println(result) 22 | } 23 | -------------------------------------------------------------------------------- /Core CS/Algorithms/Warmup/A Very Big Sum/aVeryBigSum.py3: -------------------------------------------------------------------------------- 1 | #!/bin/python3 2 | 3 | import sys 4 | 5 | def aVeryBigSum(n, ar): 6 | # Complete this function 7 | return sum(ar) 8 | 9 | n = int(input().strip()) 10 | ar = list(map(int, input().strip().split(' '))) 11 | result = aVeryBigSum(n, ar) 12 | print(result) 13 | -------------------------------------------------------------------------------- /Core CS/Algorithms/Warmup/Birthday Cake Candles/birthdayCakeCandles.kt: -------------------------------------------------------------------------------- 1 | import java.io.* 2 | import java.text.* 3 | import java.util.* 4 | import kotlin.collections.* 5 | 6 | fun birthdayCakeCandles(candles: Array): Int { 7 | val mx = candles.max() 8 | return candles.filter{it == candles.max()}.size 9 | } 10 | 11 | fun main(args: Array) { 12 | val candlesCount = readLine()!!.trim().toInt() 13 | 14 | val candles = readLine()!!.trimEnd().split(" ").map{ it.toInt() }.toTypedArray() 15 | 16 | val result = birthdayCakeCandles(candles) 17 | 18 | println(result) 19 | } 20 | -------------------------------------------------------------------------------- /Core CS/Algorithms/Warmup/Birthday Cake Candles/birthdayCakeCandles.py: -------------------------------------------------------------------------------- 1 | n = input() 2 | arr = map(int, raw_input().split()) 3 | print arr.count(max(arr)) 4 | -------------------------------------------------------------------------------- /Core CS/Algorithms/Warmup/Birthday Cake Candles/birthdayCakeCandles.py3: -------------------------------------------------------------------------------- 1 | n = input() 2 | arr = list(map(int, input().strip().split(' '))) 3 | print(arr.count(max(arr))) 4 | -------------------------------------------------------------------------------- /Core CS/Algorithms/Warmup/Compare the Triplets/compareTheTriplets.py3: -------------------------------------------------------------------------------- 1 | size = int(input()) 2 | matrix = [] 3 | 4 | for _ in range(size): 5 | row = input().strip().split(' ') 6 | matrix.append(row) 7 | 8 | d1, d2 = 0, 0 9 | 10 | for i in range(size): 11 | d1 += int(matrix[i][i]) 12 | d2 += int(matrix[-i-1][i]) 13 | 14 | print(abs(d1 - d2)) 15 | -------------------------------------------------------------------------------- /Core CS/Algorithms/Warmup/Diagonal Difference/diagonalDifference.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | using namespace std; 3 | 4 | int main() { 5 | int n; 6 | cin >> n; 7 | 8 | int arr[n][n]; 9 | 10 | int d1=0; 11 | int d2=0; 12 | 13 | for (int i = 0; i < n; i++) { 14 | for (int j = 0; j < n; j++) { 15 | cin >> arr[i][j]; 16 | if (i == j) d1 += arr[i][j]; 17 | if (i == n - j - 1) d2 += arr[i][j]; 18 | } 19 | } 20 | 21 | cout << abs(d1 - d2) << endl; 22 | return 0; 23 | } 24 | -------------------------------------------------------------------------------- /Core CS/Algorithms/Warmup/Diagonal Difference/diagonalDifference.py3: -------------------------------------------------------------------------------- 1 | size = input() 2 | matrix = [] 3 | 4 | for _ in range(size): 5 | row = map(int, raw_input().split()) 6 | matrix.append(row) 7 | 8 | d1, d2 = 0, 0 9 | 10 | for i in range(size): 11 | d1 += matrix[i][i] 12 | d2 += matrix[-i-1][i] 13 | 14 | print(abs(d1 - d2)) 15 | -------------------------------------------------------------------------------- /Core CS/Algorithms/Warmup/Mini-Max Sum/MiniMaxSum.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.IO; 4 | using System.Linq; 5 | class Solution { 6 | 7 | static void Main(String[] args) { 8 | string[] arr_temp = Console.ReadLine().Split(' '); 9 | int[] arr = Array.ConvertAll(arr_temp,Int32.Parse); 10 | Array.Sort(arr); 11 | long mx = 0; 12 | long mn = 0; 13 | for(int i = 0;i<5;i++){ 14 | if(i > 0) mx+=arr[i]; 15 | if(i < 4) mn+=arr[i]; 16 | } 17 | Console.Write(mn); 18 | Console.Write(' '); 19 | Console.Write(mx); 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /Core CS/Algorithms/Warmup/Mini-Max Sum/miniMaxSum.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | using namespace std; 3 | 4 | int main(){ 5 | long long s[5]; 6 | long long d = 0; 7 | for(int i = 0; i < 5; i++){ 8 | cin >> s[i]; 9 | d += s[i]; 10 | } 11 | sort(s,s+5); 12 | cout << d-s[4] << " " << d-s[0] << endl; 13 | } 14 | -------------------------------------------------------------------------------- /Core CS/Algorithms/Warmup/Mini-Max Sum/miniMaxSum.py: -------------------------------------------------------------------------------- 1 | # Enter your code here. Read input from STDIN. Print output to STDOUT 2 | a = sorted(map(int,raw_input().split())) 3 | print sum(a[:4]),sum(a[1:]) 4 | -------------------------------------------------------------------------------- /Core CS/Algorithms/Warmup/Mini-Max Sum/miniMaxSum.py3: -------------------------------------------------------------------------------- 1 | ar = list(map(int, input().strip().split(' '))) 2 | print(str(sum(ar) - max(ar)) + " " + str(sum(ar) - min(ar))) -------------------------------------------------------------------------------- /Core CS/Algorithms/Warmup/Mini-Max Sum/miniMaxSum.scala: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Lintik/hackerrank/2fa4fceded1706676da8c87606e2ac0283feae4d/Core CS/Algorithms/Warmup/Mini-Max Sum/miniMaxSum.scala -------------------------------------------------------------------------------- /Core CS/Algorithms/Warmup/Plus Minus/plusMinus.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | using namespace std; 4 | 5 | 6 | int main(){ 7 | int n; 8 | cin >> n; 9 | vector arr(n); 10 | for(int arr_i = 0;arr_i < n;arr_i++){ 11 | cin >> arr[arr_i]; 12 | } 13 | float cp=0; 14 | float cn=0; 15 | float c0=0; 16 | for(int i=0;i 0) cp++; 18 | else if(arr[i] < 0) cn++; 19 | else c0++; 20 | } 21 | printf("%0.06lf\n%0.06lf\n%0.06lf\n", cp, cn, c0); 22 | return 0; 23 | } 24 | -------------------------------------------------------------------------------- /Core CS/Algorithms/Warmup/Plus Minus/plusMinus.py3: -------------------------------------------------------------------------------- 1 | #!/bin/python3 2 | 3 | import sys 4 | 5 | 6 | n = int(input().strip()) 7 | arr = [int(arr_temp) for arr_temp in input().strip().split(' ')] 8 | p = 0 9 | q = 0 10 | z = 0 11 | for ele in arr: 12 | if (ele > 0): 13 | p+=1 14 | elif (ele < 0): 15 | q+=1 16 | else: 17 | z+=1 18 | print(p/n) 19 | print(q/n) 20 | print(z/n) 21 | -------------------------------------------------------------------------------- /Core CS/Algorithms/Warmup/Simple Array Sum/SimpleArraySum.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.IO; 4 | using System.Linq; 5 | class Solution { 6 | 7 | static int simpleArraySum(int n, int[] ar) { 8 | return ar.Sum(); 9 | } 10 | 11 | static void Main(String[] args) { 12 | int n = Convert.ToInt32(Console.ReadLine()); 13 | string[] ar_temp = Console.ReadLine().Split(' '); 14 | int[] ar = Array.ConvertAll(ar_temp,Int32.Parse); 15 | int result = simpleArraySum(n, ar); 16 | Console.WriteLine(result); 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /Core CS/Algorithms/Warmup/Simple Array Sum/simpleArraySum.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | using namespace std; 4 | 5 | int simpleArraySum(int n, vector ar) { 6 | // Complete this function 7 | int s = 0; 8 | for(int i = 0; i < n; i++) 9 | s += ar[i]; 10 | return s; 11 | 12 | } 13 | 14 | int main() { 15 | int n; 16 | cin >> n; 17 | vector ar(n); 18 | for(int ar_i = 0; ar_i < n; ar_i++){ 19 | cin >> ar[ar_i]; 20 | } 21 | int result = simpleArraySum(n, ar); 22 | cout << result << endl; 23 | return 0; 24 | } 25 | -------------------------------------------------------------------------------- /Core CS/Algorithms/Warmup/Simple Array Sum/simpleArraySum.kt: -------------------------------------------------------------------------------- 1 | import java.util.* 2 | 3 | fun simpleArraySum(ar: Array): Int { 4 | //var for mutable, val for immutable 5 | var t: Int = 0 6 | for(i in ar) 7 | t += i 8 | return t 9 | } 10 | 11 | fun main(args: Array) { 12 | val scan = Scanner(System.`in`) 13 | val arCount = scan.nextLine().trim().toInt() 14 | 15 | val ar = scan.nextLine().split(" ").map{ it.trim().toInt() }.toTypedArray() 16 | 17 | val result = simpleArraySum(ar) 18 | 19 | println(result) 20 | scan.close(); 21 | } 22 | -------------------------------------------------------------------------------- /Core CS/Algorithms/Warmup/Simple Array Sum/simpleArraySum.py3: -------------------------------------------------------------------------------- 1 | #!/bin/python3 2 | 3 | import sys 4 | 5 | def simpleArraySum(n, ar): 6 | # Complete this function 7 | return sum(ar) 8 | 9 | n = int(input().strip()) 10 | ar = list(map(int, input().strip().split(' '))) 11 | result = simpleArraySum(n, ar) 12 | print(result) 13 | -------------------------------------------------------------------------------- /Core CS/Algorithms/Warmup/Solve Me First/SolveMeFirst.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.IO; 4 | class Solution { 5 | static int solveMeFirst(int a, int b) { 6 | return a + b; 7 | } 8 | 9 | static void Main(String[] args) { 10 | int val1 = Convert.ToInt32(Console.ReadLine()); 11 | int val2 = Convert.ToInt32(Console.ReadLine()); 12 | int sum = solveMeFirst(val1,val2); 13 | Console.WriteLine(sum); 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /Core CS/Algorithms/Warmup/Solve Me First/readme.md: -------------------------------------------------------------------------------- 1 | ### __Solve Me First__ 2 | 3 | Complete the function solveMeFirst to compute the sum of two integers. 4 | 5 | __Function prototype:__ 6 | ```c++ 7 | int solveMeFirst(int a, int b); 8 | ``` 9 | 10 | where, 11 | 12 | + `a` is the first integer input. 13 | + `b` is the second integer input 14 | 15 | __Return values__ 16 | 17 | + sum of the above two integers 18 | 19 | __Sample Input__ 20 | ``` 21 | a = 2 22 | b = 3 23 | ``` 24 | __Sample Output__ 25 | ``` 26 | 5 27 | ``` 28 | __Explanation__ 29 | 30 | The sum of the two integers __*a*__ and __*b*__ is computed as: __2 + 3 = 5__. -------------------------------------------------------------------------------- /Core CS/Algorithms/Warmup/Solve Me First/solveMeFirst.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | using namespace std; 3 | 4 | int solveMeFirst(int a, int b) { 5 | return a + b; 6 | 7 | } 8 | int main() { 9 | int num1, num2; 10 | int sum; 11 | cin>>num1>>num2; 12 | sum = solveMeFirst(num1,num2); 13 | cout<) { 8 | val sc = Scanner(System.`in`) 9 | val num1 = sc.nextInt() 10 | val num2 = sc.nextInt() 11 | val sum = solveMeFirst(num1, num2) 12 | println(sum) 13 | } 14 | 15 | -------------------------------------------------------------------------------- /Core CS/Algorithms/Warmup/Solve Me First/solveMeFirst.py3: -------------------------------------------------------------------------------- 1 | def solveMeFirst(a,b): 2 | return a + b 3 | 4 | 5 | num1 = int(input()) 6 | num2 = int(input()) 7 | res = solveMeFirst(num1,num2) 8 | print(res) 9 | -------------------------------------------------------------------------------- /Core CS/Algorithms/Warmup/Solve Me First/solveMeFirst.scala: -------------------------------------------------------------------------------- 1 | object Solution { 2 | 3 | def main(args: Array[String]) { 4 | println(io.Source.stdin.getLines().take(2).map(_.toInt).sum) 5 | } 6 | } 7 | 8 | -------------------------------------------------------------------------------- /Core CS/Algorithms/Warmup/Staircase/Staircase.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.IO; 4 | using System.Linq; 5 | class Solution { 6 | 7 | static void Main(String[] args) { 8 | int n = Convert.ToInt32(Console.ReadLine()); 9 | for(int i = 0;ii+1;j--) 11 | Console.Write(' '); 12 | for(int k = i; k>-1;k--) 13 | Console.Write('#'); 14 | 15 | Console.WriteLine(); 16 | } 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /Core CS/Algorithms/Warmup/Staircase/staircase.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | using namespace std; 3 | 4 | int main() { 5 | int n = 0; 6 | cin>>n; 7 | for(int i = 0;ii+1;j--) 9 | cout<<' '; 10 | for(int k = i; k>-1;k--) 11 | cout<<'#'; 12 | 13 | cout<) { 13 | val scan = Scanner(System.`in`) 14 | 15 | val n = scan.nextLine().trim().toInt() 16 | 17 | staircase(n) 18 | } 19 | -------------------------------------------------------------------------------- /Core CS/Algorithms/Warmup/Staircase/staircase.py3: -------------------------------------------------------------------------------- 1 | n = int(input()) 2 | for i in range(n): 3 | #repeat string by multiplication 4 | print(' '*(n-i-1), end="") 5 | print('#'*(i+1)) 6 | -------------------------------------------------------------------------------- /Core CS/Algorithms/Warmup/Staircase/staircase.scala: -------------------------------------------------------------------------------- 1 | import java.io._ 2 | import java.util._ 3 | 4 | object Solution { 5 | 6 | // Complete the staircase function below. 7 | def staircase(n: Int) { 8 | for(i <- 1 to n){ 9 | //repeat strings in scala by multiplication 10 | print(" " * (n-i)) 11 | println("#" * (i)) 12 | } 13 | } 14 | 15 | def main(args: Array[String]) { 16 | val stdin = scala.io.StdIn 17 | 18 | val n = stdin.readLine.trim.toInt 19 | 20 | staircase(n) 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /Core CS/Algorithms/Warmup/Time Conversion/timeConversion.py3: -------------------------------------------------------------------------------- 1 | #!/bin/python3 2 | 3 | import os 4 | import sys 5 | 6 | def timeConversion(s): 7 | if s[8] == "P": 8 | if s[0:2] == "12": 9 | return s[0:8] 10 | else: 11 | return str(int(s[0:2]) + 12) + s[2:8] 12 | else: 13 | if s[0:2] == "12": 14 | return "00" + s[2:8] 15 | else: 16 | return s[0:8] 17 | 18 | 19 | if __name__ == '__main__': 20 | f = open(os.environ['OUTPUT_PATH'], 'w') 21 | s = input() 22 | result = timeConversion(s) 23 | f.write(result + '\n') 24 | f.close() 25 | -------------------------------------------------------------------------------- /Core CS/Data Structure/Arrays/2D Array - DS/2d-array-English.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Lintik/hackerrank/2fa4fceded1706676da8c87606e2ac0283feae4d/Core CS/Data Structure/Arrays/2D Array - DS/2d-array-English.pdf -------------------------------------------------------------------------------- /Core CS/Data Structure/Arrays/2D Array - DS/hourglassSum.py3: -------------------------------------------------------------------------------- 1 | #!/bin/python3 2 | import sys 3 | 4 | arr = [] 5 | for arr_i in range(6): 6 | arr_t = [int(arr_temp) for arr_temp in input().strip().split(' ')] 7 | arr.append(arr_t) 8 | n = [None]*16 9 | k = 0 10 | for i in range(4): 11 | for j in range(4): 12 | n[k] = arr[i][j] + arr[i][j+1] + arr[i][j+2] 13 | n[k] += arr[i+1][j+1] 14 | n[k] += arr[i+2][j] + arr[i+2][j+1] + arr[i+2][j+2] 15 | k+=1 16 | 17 | m = max(n) 18 | print(m) 19 | -------------------------------------------------------------------------------- /Core CS/Data Structure/Arrays/Arrays - DS/ReserveArray.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.IO; 4 | using System.Linq; 5 | class Solution { 6 | 7 | static void Main(String[] args) { 8 | int n = Convert.ToInt32(Console.ReadLine()); 9 | string[] arr_temp = Console.ReadLine().Split(' '); 10 | int[] arr = Array.ConvertAll(arr_temp,Int32.Parse); 11 | Console.WriteLine("{0}", string.Join(" ", arr.Reverse())); 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /Core CS/Data Structure/Arrays/Arrays - DS/arrays-ds-English.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Lintik/hackerrank/2fa4fceded1706676da8c87606e2ac0283feae4d/Core CS/Data Structure/Arrays/Arrays - DS/arrays-ds-English.pdf -------------------------------------------------------------------------------- /Core CS/Data Structure/Arrays/Arrays - DS/reverseArray.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | using namespace std; 3 | 4 | int main(){ 5 | int n; 6 | cin >> n; 7 | vector arr(n); 8 | for(int arr_i = 0;arr_i < n;arr_i++){ 9 | cin >> arr[arr_i]; 10 | } 11 | for(int i = n - 1;i >= 0; i--){ 12 | cout << arr[i] << " "; 13 | } 14 | return 0; 15 | } 16 | -------------------------------------------------------------------------------- /Core CS/Data Structure/Arrays/Arrays - DS/reverseArray.java: -------------------------------------------------------------------------------- 1 | import java.io.*; 2 | import java.util.*; 3 | 4 | public class Solution { 5 | 6 | public static void main(String[] args) { 7 | Scanner sc = new Scanner(System.in); 8 | int n = sc.nextInt(); 9 | int[] A = new int[n]; 10 | for(int i = 0;i < n;i++) 11 | A[i] = sc.nextInt(); 12 | for(int i = n - 1;i >= 0;i--){ 13 | System.out.print(A[i]); 14 | System.out.print(' '); 15 | } 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /Core CS/Data Structure/Arrays/Arrays - DS/reverseArray.js: -------------------------------------------------------------------------------- 1 | function processData(input) { 2 | var data = input.split('\n'); 3 | var n = data[0]; 4 | var numbers = data[1].split(' '); 5 | var result = ""; 6 | for(var i = 0; i < n; i++) 7 | { 8 | result += numbers[n-1-i] + " "; 9 | } 10 | console.log(result); 11 | } 12 | 13 | process.stdin.resume(); 14 | process.stdin.setEncoding("ascii"); 15 | _input = ""; 16 | process.stdin.on("data", function (input) { 17 | _input += input; 18 | }); 19 | 20 | process.stdin.on("end", function () { 21 | processData(_input); 22 | }); 23 | -------------------------------------------------------------------------------- /Core CS/Data Structure/Arrays/Arrays - DS/reverseArray.py3: -------------------------------------------------------------------------------- 1 | import sys 2 | 3 | N = input() 4 | A = [int(x) for x in input().split()] 5 | 6 | print(' '.join([str(x) for x in reversed(A)])) 7 | -------------------------------------------------------------------------------- /Core CS/Data Structure/Arrays/Dynamic Array/DynamicArray.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Lintik/hackerrank/2fa4fceded1706676da8c87606e2ac0283feae4d/Core CS/Data Structure/Arrays/Dynamic Array/DynamicArray.cs -------------------------------------------------------------------------------- /Core CS/Data Structure/Arrays/Dynamic Array/dynamicArray.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Lintik/hackerrank/2fa4fceded1706676da8c87606e2ac0283feae4d/Core CS/Data Structure/Arrays/Dynamic Array/dynamicArray.cpp -------------------------------------------------------------------------------- /Core CS/Data Structure/Arrays/Dynamic Array/dynamicArray.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Lintik/hackerrank/2fa4fceded1706676da8c87606e2ac0283feae4d/Core CS/Data Structure/Arrays/Dynamic Array/dynamicArray.js -------------------------------------------------------------------------------- /Core CS/Data Structure/Arrays/Dynamic Array/dynamicArray.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Lintik/hackerrank/2fa4fceded1706676da8c87606e2ac0283feae4d/Core CS/Data Structure/Arrays/Dynamic Array/dynamicArray.kt -------------------------------------------------------------------------------- /Core CS/Data Structure/Arrays/Dynamic Array/dynamicArray.py3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Lintik/hackerrank/2fa4fceded1706676da8c87606e2ac0283feae4d/Core CS/Data Structure/Arrays/Dynamic Array/dynamicArray.py3 -------------------------------------------------------------------------------- /Core CS/Data Structure/Arrays/Dynamic Array/dynamicArray.scala: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Lintik/hackerrank/2fa4fceded1706676da8c87606e2ac0283feae4d/Core CS/Data Structure/Arrays/Dynamic Array/dynamicArray.scala -------------------------------------------------------------------------------- /Core CS/Data Structure/Arrays/README.md: -------------------------------------------------------------------------------- 1 | # Arrays 2 | |Problem Statement|c++|java|c#|python|javascript| 3 | |---|---|---|---|---|---| 4 | |Arrays - DS||||| 5 | -------------------------------------------------------------------------------- /Core CS/Data Structure/Balanced Trees/Self Balancing Tree/code.cpp: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /Core CS/Data Structure/Linked Lists/Print the Elements of a Linked List/code.cpp: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /Core CS/Data Structure/Linked Lists/Print the Elements of a Linked List/code.cs: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /Core CS/Data Structure/Linked Lists/Print the Elements of a Linked List/code.java: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /Core CS/Data Structure/Linked Lists/Print the Elements of a Linked List/code.js: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /Core CS/Data Structure/Linked Lists/Print the Elements of a Linked List/code.py3: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /Core CS/Data Structure/README.md: -------------------------------------------------------------------------------- 1 | # Data Structure 2 | -------------------------------------------------------------------------------- /Core CS/Data Structure/Trees/Tree- Preorder Traversal/code.cpp: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /Core CS/Data Structure/Trees/Tree- Preorder Traversal/code.cs: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /Core CS/Data Structure/Trees/Tree- Preorder Traversal/code.java: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /Core CS/Data Structure/Trees/Tree- Preorder Traversal/code.js: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /Core CS/Data Structure/Trees/Tree- Preorder Traversal/code.py3: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /Core CS/Mathematics/README.md: -------------------------------------------------------------------------------- 1 | # Mathematics 2 | -------------------------------------------------------------------------------- /Language Proficiency/C/Array and Strings/1D Arrays in C/1D_Arrays_in_C.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | int main() { 4 | 5 | int n; 6 | int s = 0; 7 | scanf("%d",&n); 8 | int arr[n]; 9 | for(int i = 0;i < n;i++){ 10 | scanf("%d",&arr[i]); 11 | s += arr[i]; 12 | } 13 | printf("%d",s); 14 | return 0; 15 | } -------------------------------------------------------------------------------- /Language Proficiency/C/Array and Strings/1D Arrays in C/1d-arrays-in-c-English.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Lintik/hackerrank/2fa4fceded1706676da8c87606e2ac0283feae4d/Language Proficiency/C/Array and Strings/1D Arrays in C/1d-arrays-in-c-English.pdf -------------------------------------------------------------------------------- /Language Proficiency/C/Array and Strings/Array Reversal/Array_Reversal.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | int main() 5 | { 6 | int num, *arr, i; 7 | scanf("%d", &num); 8 | arr = (int*) malloc(num * sizeof(int)); 9 | for(i = 0; i < num; i++) { 10 | scanf("%d", arr + i); 11 | } 12 | 13 | for(i = 0;i < num/2;i++){ 14 | int temp = arr[num-1-i]; 15 | arr[num-1-i] = arr[i]; 16 | arr[i]=temp; 17 | } 18 | 19 | for(i = 0; i < num; i++) 20 | printf("%d ", *(arr + i)); 21 | return 0; 22 | } -------------------------------------------------------------------------------- /Language Proficiency/C/Array and Strings/Array Reversal/reverse-array-c-English.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Lintik/hackerrank/2fa4fceded1706676da8c87606e2ac0283feae4d/Language Proficiency/C/Array and Strings/Array Reversal/reverse-array-c-English.pdf -------------------------------------------------------------------------------- /Language Proficiency/C/Array and Strings/Digit Frequency/Digit_Frequency.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | int main() { 4 | 5 | char c; 6 | int d[10] = {0,0,0,0,0,0,0,0,0,0}; 7 | while(scanf("%c", &c) == 1) 8 | if(c >= '0' && c <= '9') 9 | (*(d+(c-'0')))++; 10 | 11 | for(int i = 0; i < 10; i++) 12 | printf("%d ", *(d+i)); 13 | } -------------------------------------------------------------------------------- /Language Proficiency/C/Array and Strings/Digit Frequency/frequency-of-digits-1-English.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Lintik/hackerrank/2fa4fceded1706676da8c87606e2ac0283feae4d/Language Proficiency/C/Array and Strings/Digit Frequency/frequency-of-digits-1-English.pdf -------------------------------------------------------------------------------- /Language Proficiency/C/Array and Strings/Dynamic Array in C/dynamic-array-in-c-English.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Lintik/hackerrank/2fa4fceded1706676da8c87606e2ac0283feae4d/Language Proficiency/C/Array and Strings/Dynamic Array in C/dynamic-array-in-c-English.pdf -------------------------------------------------------------------------------- /Language Proficiency/C/Array and Strings/Printing Tokens/Printing_Token.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | #include 5 | 6 | int main() { 7 | 8 | char *s; 9 | s = malloc(1024 * sizeof(char)); 10 | scanf("%[^\n]", s); 11 | s = realloc(s, strlen(s) + 1); 12 | 13 | for(int i = 0; i < strlen(s) ; i++) 14 | { 15 | if(s[i] == ' ') 16 | printf("\n"); 17 | else 18 | printf("%c",s[i]); 19 | } 20 | return 0; 21 | } -------------------------------------------------------------------------------- /Language Proficiency/C/Array and Strings/Printing Tokens/printing-tokens--English.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Lintik/hackerrank/2fa4fceded1706676da8c87606e2ac0283feae4d/Language Proficiency/C/Array and Strings/Printing Tokens/printing-tokens--English.pdf -------------------------------------------------------------------------------- /Language Proficiency/C/Conditionals and Loops/Bitwise Operators/bitwise-operators-in-c-English.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Lintik/hackerrank/2fa4fceded1706676da8c87606e2ac0283feae4d/Language Proficiency/C/Conditionals and Loops/Bitwise Operators/bitwise-operators-in-c-English.pdf -------------------------------------------------------------------------------- /Language Proficiency/C/Conditionals and Loops/Conditional Statements in C/conditional-statements-in-c-English.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Lintik/hackerrank/2fa4fceded1706676da8c87606e2ac0283feae4d/Language Proficiency/C/Conditionals and Loops/Conditional Statements in C/conditional-statements-in-c-English.pdf -------------------------------------------------------------------------------- /Language Proficiency/C/Conditionals and Loops/For Loop in C/for-loop-in-c-English.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Lintik/hackerrank/2fa4fceded1706676da8c87606e2ac0283feae4d/Language Proficiency/C/Conditionals and Loops/For Loop in C/for-loop-in-c-English.pdf -------------------------------------------------------------------------------- /Language Proficiency/C/Conditionals and Loops/Printing Patterns using Loops/Printing_Patterns_using_Loops.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | #include 5 | 6 | int main() 7 | { 8 | 9 | int n; 10 | scanf("%d", &n); 11 | int len = n*2 - 1; 12 | for(int i=0;i 2 | #include 3 | #include 4 | #include 5 | 6 | int main() { 7 | 8 | int n; 9 | scanf("%d", &n); 10 | int t = 0; 11 | for(int i = 0;i<5;i++){ 12 | t += n % 10; 13 | n /= 10; 14 | } 15 | printf("%d",t); 16 | return 0; 17 | } -------------------------------------------------------------------------------- /Language Proficiency/C/Conditionals and Loops/Sum of Digits of a Five Digit Number/input00.txt: -------------------------------------------------------------------------------- 1 | 10564 -------------------------------------------------------------------------------- /Language Proficiency/C/Conditionals and Loops/Sum of Digits of a Five Digit Number/output00.txt: -------------------------------------------------------------------------------- 1 | 16 -------------------------------------------------------------------------------- /Language Proficiency/C/Conditionals and Loops/Sum of Digits of a Five Digit Number/sum-of-digits-of-a-five-digit-number-English.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Lintik/hackerrank/2fa4fceded1706676da8c87606e2ac0283feae4d/Language Proficiency/C/Conditionals and Loops/Sum of Digits of a Five Digit Number/sum-of-digits-of-a-five-digit-number-English.pdf -------------------------------------------------------------------------------- /Language Proficiency/C/Functions/Calculate the Nth term/Calculate_the_Nth_term.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | int find_nth_term(int n, int a, int b, int c) { 4 | if(n == 0) 5 | return c; 6 | else 7 | return find_nth_term(n - 1, b, c, a + b + c); 8 | } 9 | 10 | int main() { 11 | int n, a, b, c; 12 | 13 | scanf("%d %d %d %d", &n, &a, &b, &c); 14 | int ans = find_nth_term(n, a, b, c); 15 | 16 | printf("%d", ans); 17 | return 0; 18 | } -------------------------------------------------------------------------------- /Language Proficiency/C/Functions/Calculate the Nth term/recursion-in-c-English.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Lintik/hackerrank/2fa4fceded1706676da8c87606e2ac0283feae4d/Language Proficiency/C/Functions/Calculate the Nth term/recursion-in-c-English.pdf -------------------------------------------------------------------------------- /Language Proficiency/C/Functions/Permutations of Strings/permutations-of-strings-English.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Lintik/hackerrank/2fa4fceded1706676da8c87606e2ac0283feae4d/Language Proficiency/C/Functions/Permutations of Strings/permutations-of-strings-English.pdf -------------------------------------------------------------------------------- /Language Proficiency/C/Functions/Querying the Document/queryingTheDocument.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Lintik/hackerrank/2fa4fceded1706676da8c87606e2ac0283feae4d/Language Proficiency/C/Functions/Querying the Document/queryingTheDocument.c -------------------------------------------------------------------------------- /Language Proficiency/C/Functions/Sorting Array of Strings/sorting-array-of-strings-English.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Lintik/hackerrank/2fa4fceded1706676da8c87606e2ac0283feae4d/Language Proficiency/C/Functions/Sorting Array of Strings/sorting-array-of-strings-English.pdf -------------------------------------------------------------------------------- /Language Proficiency/C/Functions/Students Marks Sum/students-marks-sum-English.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Lintik/hackerrank/2fa4fceded1706676da8c87606e2ac0283feae4d/Language Proficiency/C/Functions/Students Marks Sum/students-marks-sum-English.pdf -------------------------------------------------------------------------------- /Language Proficiency/C/Introduction/Functions in C/Functions-in-c-English.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Lintik/hackerrank/2fa4fceded1706676da8c87606e2ac0283feae4d/Language Proficiency/C/Introduction/Functions in C/Functions-in-c-English.pdf -------------------------------------------------------------------------------- /Language Proficiency/C/Introduction/Functions in C/functions_in_C.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | int max_of_four(int a, int b, int c, int d){ 4 | a = a > b? a:b; 5 | c = c > d? c:d; 6 | return a > c? a:c; 7 | } 8 | 9 | int main() { 10 | int a, b, c, d; 11 | scanf("%d %d %d %d", &a, &b, &c, &d); 12 | int ans = max_of_four(a, b, c, d); 13 | printf("%d", ans); 14 | 15 | return 0; 16 | } -------------------------------------------------------------------------------- /Language Proficiency/C/Introduction/Hello World in C/Hello_World_in_C.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | #include 5 | 6 | int main() 7 | { 8 | printf("Hello, World!\n"); 9 | char s[100]; 10 | scanf("%[^\n]%*c", s); 11 | printf("%s", s); 12 | 13 | return 0; 14 | } -------------------------------------------------------------------------------- /Language Proficiency/C/Introduction/Hello World in C/hello-world-c-English.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Lintik/hackerrank/2fa4fceded1706676da8c87606e2ac0283feae4d/Language Proficiency/C/Introduction/Hello World in C/hello-world-c-English.pdf -------------------------------------------------------------------------------- /Language Proficiency/C/Introduction/Hello World in C/input00.txt: -------------------------------------------------------------------------------- 1 | Welcome to C programming. -------------------------------------------------------------------------------- /Language Proficiency/C/Introduction/Hello World in C/output00.txt: -------------------------------------------------------------------------------- 1 | Hello, World! 2 | Welcome to C programming. -------------------------------------------------------------------------------- /Language Proficiency/C/Introduction/Playing with Characters/Playing_with_Characters.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | #include 5 | 6 | int main() 7 | { 8 | char ch; 9 | scanf("%c", &ch); 10 | printf("%c\n", ch); 11 | scanf("\n"); 12 | 13 | char s[256]; 14 | scanf("%s" , s); 15 | printf("%s\n", s); 16 | scanf("\n"); 17 | 18 | char sen[256]; 19 | scanf("%[^\n]%*c", sen); 20 | printf("%s", sen); 21 | 22 | return 0; 23 | } -------------------------------------------------------------------------------- /Language Proficiency/C/Introduction/Playing with Characters/input00.txt: -------------------------------------------------------------------------------- 1 | C 2 | Language 3 | Welcome To C!! -------------------------------------------------------------------------------- /Language Proficiency/C/Introduction/Playing with Characters/output00.txt: -------------------------------------------------------------------------------- 1 | C 2 | Language 3 | Welcome To C!! -------------------------------------------------------------------------------- /Language Proficiency/C/Introduction/Playing with Characters/playing-with-characters-English.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Lintik/hackerrank/2fa4fceded1706676da8c87606e2ac0283feae4d/Language Proficiency/C/Introduction/Playing with Characters/playing-with-characters-English.pdf -------------------------------------------------------------------------------- /Language Proficiency/C/Introduction/Pointers in C/Pointers_in_C.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | void update(int *a,int *b) { 4 | int t = *a; 5 | *a = *a + *b; 6 | *b = t - *b > 0? t - *b: -1 * (t - *b); 7 | } 8 | 9 | int main() { 10 | int a, b; 11 | int *pa = &a, *pb = &b; 12 | 13 | scanf("%d %d", &a, &b); 14 | update(pa, pb); 15 | printf("%d\n%d", a, b); 16 | 17 | return 0; 18 | } -------------------------------------------------------------------------------- /Language Proficiency/C/Introduction/Pointers in C/pointer-in-c-English.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Lintik/hackerrank/2fa4fceded1706676da8c87606e2ac0283feae4d/Language Proficiency/C/Introduction/Pointers in C/pointer-in-c-English.pdf -------------------------------------------------------------------------------- /Language Proficiency/C/Introduction/Sum and Difference of Two Numbers/Sum_and_Difference_of_Two_Numbers.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | #include 5 | 6 | int main() 7 | { 8 | int a, b; 9 | scanf("%d", &a); 10 | scanf("%d", &b); 11 | printf("%d %d\n", a+b,a-b); 12 | 13 | float c, d; 14 | scanf("%f", &c); 15 | scanf("%f", &d); 16 | printf("%1.1f %1.1f", c+d,c-d); 17 | 18 | return 0; 19 | } -------------------------------------------------------------------------------- /Language Proficiency/C/Introduction/Sum and Difference of Two Numbers/input00.txt: -------------------------------------------------------------------------------- 1 | 10 4 2 | 4.0 2.0 3 | -------------------------------------------------------------------------------- /Language Proficiency/C/Introduction/Sum and Difference of Two Numbers/output00.txt: -------------------------------------------------------------------------------- 1 | 14 6 2 | 6.0 2.0 3 | -------------------------------------------------------------------------------- /Language Proficiency/C/Introduction/Sum and Difference of Two Numbers/sum-numbers-c-English.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Lintik/hackerrank/2fa4fceded1706676da8c87606e2ac0283feae4d/Language Proficiency/C/Introduction/Sum and Difference of Two Numbers/sum-numbers-c-English.pdf -------------------------------------------------------------------------------- /Language Proficiency/C/Structs and Enums/Boxes through a Tunnel/boxesThroughATunnel.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Lintik/hackerrank/2fa4fceded1706676da8c87606e2ac0283feae4d/Language Proficiency/C/Structs and Enums/Boxes through a Tunnel/boxesThroughATunnel.c -------------------------------------------------------------------------------- /Language Proficiency/C/Structs and Enums/Post Transition/postTransition.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Lintik/hackerrank/2fa4fceded1706676da8c87606e2ac0283feae4d/Language Proficiency/C/Structs and Enums/Post Transition/postTransition.c -------------------------------------------------------------------------------- /Language Proficiency/C/Structs and Enums/Small Triangles, Large Triangles/smallTrianglesLargeTriangles.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Lintik/hackerrank/2fa4fceded1706676da8c87606e2ac0283feae4d/Language Proficiency/C/Structs and Enums/Small Triangles, Large Triangles/smallTrianglesLargeTriangles.c -------------------------------------------------------------------------------- /Language Proficiency/C/Structs and Enums/Structuring the Document/structuringTheDocument.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Lintik/hackerrank/2fa4fceded1706676da8c87606e2ac0283feae4d/Language Proficiency/C/Structs and Enums/Structuring the Document/structuringTheDocument.c -------------------------------------------------------------------------------- /Language Proficiency/Cpp/Classes/Abstract Classes - Polymorphism/abstract-classes-polymorphism-English.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Lintik/hackerrank/2fa4fceded1706676da8c87606e2ac0283feae4d/Language Proficiency/Cpp/Classes/Abstract Classes - Polymorphism/abstract-classes-polymorphism-English.pdf -------------------------------------------------------------------------------- /Language Proficiency/Cpp/Classes/Box It/box-it-English.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Lintik/hackerrank/2fa4fceded1706676da8c87606e2ac0283feae4d/Language Proficiency/Cpp/Classes/Box It/box-it-English.pdf -------------------------------------------------------------------------------- /Language Proficiency/Cpp/Classes/Class/c-tutorial-class-English.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Lintik/hackerrank/2fa4fceded1706676da8c87606e2ac0283feae4d/Language Proficiency/Cpp/Classes/Class/c-tutorial-class-English.pdf -------------------------------------------------------------------------------- /Language Proficiency/Cpp/Classes/Classes and Objects/classes-objects-English.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Lintik/hackerrank/2fa4fceded1706676da8c87606e2ac0283feae4d/Language Proficiency/Cpp/Classes/Classes and Objects/classes-objects-English.pdf -------------------------------------------------------------------------------- /Language Proficiency/Cpp/Classes/Exceptional Server/exceptional-server-English.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Lintik/hackerrank/2fa4fceded1706676da8c87606e2ac0283feae4d/Language Proficiency/Cpp/Classes/Exceptional Server/exceptional-server-English.pdf -------------------------------------------------------------------------------- /Language Proficiency/Cpp/Classes/Inherited Code/inherited-code-English.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Lintik/hackerrank/2fa4fceded1706676da8c87606e2ac0283feae4d/Language Proficiency/Cpp/Classes/Inherited Code/inherited-code-English.pdf -------------------------------------------------------------------------------- /Language Proficiency/Cpp/Classes/Structs/c-tutorial-struct-English.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Lintik/hackerrank/2fa4fceded1706676da8c87606e2ac0283feae4d/Language Proficiency/Cpp/Classes/Structs/c-tutorial-struct-English.pdf -------------------------------------------------------------------------------- /Language Proficiency/Cpp/Classes/Structs/structs.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | #include 5 | #include 6 | using namespace std; 7 | 8 | struct Student{ 9 | int age; 10 | string first_name; 11 | string last_name; 12 | int standard; 13 | }; 14 | 15 | int main() { 16 | Student st; 17 | 18 | cin >> st.age >> st.first_name >> st.last_name >> st.standard; 19 | cout << st.age << " " << st.first_name << " " << st.last_name << " " << st.standard; 20 | 21 | return 0; 22 | } 23 | -------------------------------------------------------------------------------- /Language Proficiency/Cpp/Classes/Virtual Functions/virtual-functions-English.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Lintik/hackerrank/2fa4fceded1706676da8c87606e2ac0283feae4d/Language Proficiency/Cpp/Classes/Virtual Functions/virtual-functions-English.pdf -------------------------------------------------------------------------------- /Language Proficiency/Cpp/Debugging/Cpp exception handling/cpp-exception-handling-English.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Lintik/hackerrank/2fa4fceded1706676da8c87606e2ac0283feae4d/Language Proficiency/Cpp/Debugging/Cpp exception handling/cpp-exception-handling-English.pdf -------------------------------------------------------------------------------- /Language Proficiency/Cpp/Debugging/Debugging.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Lintik/hackerrank/2fa4fceded1706676da8c87606e2ac0283feae4d/Language Proficiency/Cpp/Debugging/Debugging.md -------------------------------------------------------------------------------- /Language Proficiency/Cpp/Debugging/Hotel Prices/hotel-prices-English.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Lintik/hackerrank/2fa4fceded1706676da8c87606e2ac0283feae4d/Language Proficiency/Cpp/Debugging/Hotel Prices/hotel-prices-English.pdf -------------------------------------------------------------------------------- /Language Proficiency/Cpp/Debugging/Messages Order/messages-order-English.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Lintik/hackerrank/2fa4fceded1706676da8c87606e2ac0283feae4d/Language Proficiency/Cpp/Debugging/Messages Order/messages-order-English.pdf -------------------------------------------------------------------------------- /Language Proficiency/Cpp/Debugging/Overloading Ostream Operator/overloading-ostream-operator-English.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Lintik/hackerrank/2fa4fceded1706676da8c87606e2ac0283feae4d/Language Proficiency/Cpp/Debugging/Overloading Ostream Operator/overloading-ostream-operator-English.pdf -------------------------------------------------------------------------------- /Language Proficiency/Cpp/Debugging/Overloading Ostream Operator/overloadingOstreamOperator.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Lintik/hackerrank/2fa4fceded1706676da8c87606e2ac0283feae4d/Language Proficiency/Cpp/Debugging/Overloading Ostream Operator/overloadingOstreamOperator.md -------------------------------------------------------------------------------- /Language Proficiency/Cpp/Inheritance/Accessing Inherited Functions/accessing-inherited-functions-English.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Lintik/hackerrank/2fa4fceded1706676da8c87606e2ac0283feae4d/Language Proficiency/Cpp/Inheritance/Accessing Inherited Functions/accessing-inherited-functions-English.pdf -------------------------------------------------------------------------------- /Language Proficiency/Cpp/Inheritance/Inheritance Introduction/inheritance-introduction-English.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Lintik/hackerrank/2fa4fceded1706676da8c87606e2ac0283feae4d/Language Proficiency/Cpp/Inheritance/Inheritance Introduction/inheritance-introduction-English.pdf -------------------------------------------------------------------------------- /Language Proficiency/Cpp/Inheritance/Inheritance.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Lintik/hackerrank/2fa4fceded1706676da8c87606e2ac0283feae4d/Language Proficiency/Cpp/Inheritance/Inheritance.md -------------------------------------------------------------------------------- /Language Proficiency/Cpp/Inheritance/Magic Spells/magic-spells-English.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Lintik/hackerrank/2fa4fceded1706676da8c87606e2ac0283feae4d/Language Proficiency/Cpp/Inheritance/Magic Spells/magic-spells-English.pdf -------------------------------------------------------------------------------- /Language Proficiency/Cpp/Inheritance/Multi Level Inheritance/multi-level-inheritance-cpp-English.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Lintik/hackerrank/2fa4fceded1706676da8c87606e2ac0283feae4d/Language Proficiency/Cpp/Inheritance/Multi Level Inheritance/multi-level-inheritance-cpp-English.pdf -------------------------------------------------------------------------------- /Language Proficiency/Cpp/Inheritance/Rectangle Area/rectangle-area-English.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Lintik/hackerrank/2fa4fceded1706676da8c87606e2ac0283feae4d/Language Proficiency/Cpp/Inheritance/Rectangle Area/rectangle-area-English.pdf -------------------------------------------------------------------------------- /Language Proficiency/Cpp/Introduction/Arrays Introduction/arrays-introduction-English.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Lintik/hackerrank/2fa4fceded1706676da8c87606e2ac0283feae4d/Language Proficiency/Cpp/Introduction/Arrays Introduction/arrays-introduction-English.pdf -------------------------------------------------------------------------------- /Language Proficiency/Cpp/Introduction/Arrays Introduction/arraysIntroduction.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | using namespace std; 3 | 4 | int main() { 5 | int i; 6 | cin >> i; 7 | int n[i]; 8 | for(int j = 0; j < i;j++){ 9 | cin >> n[j]; 10 | } 11 | for(int j = i - 1;j >= 0;j--) 12 | cout << n[j] << " "; 13 | return 0; 14 | } 15 | -------------------------------------------------------------------------------- /Language Proficiency/Cpp/Introduction/Basic Data Types/basicDataTypes.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | using namespace std; 5 | 6 | int main() { 7 | int a; 8 | long b; 9 | char c; 10 | float d; 11 | double e; 12 | cin >> a >> b >> c >> d >> e; 13 | cout << a << endl << b << endl << c << endl; 14 | cout << fixed << setprecision(3) << d << endl; 15 | cout << fixed << setprecision(9) << e; 16 | return 0; 17 | } 18 | -------------------------------------------------------------------------------- /Language Proficiency/Cpp/Introduction/Basic Data Types/c-tutorial-basic-data-types-English.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Lintik/hackerrank/2fa4fceded1706676da8c87606e2ac0283feae4d/Language Proficiency/Cpp/Introduction/Basic Data Types/c-tutorial-basic-data-types-English.pdf -------------------------------------------------------------------------------- /Language Proficiency/Cpp/Introduction/Conditional Statements/c-tutorial-conditional-if-else-English.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Lintik/hackerrank/2fa4fceded1706676da8c87606e2ac0283feae4d/Language Proficiency/Cpp/Introduction/Conditional Statements/c-tutorial-conditional-if-else-English.pdf -------------------------------------------------------------------------------- /Language Proficiency/Cpp/Introduction/Conditional Statements/conditionalStatements.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | using namespace std; 3 | 4 | int main() { 5 | int s; 6 | cin >> s; 7 | if(s == 1) cout << "one"; 8 | else if(s == 2) cout << "two"; 9 | else if(s == 3) cout << "three"; 10 | else if(s == 4) cout << "four"; 11 | else if(s == 5) cout << "five"; 12 | else if(s == 6) cout << "six"; 13 | else if(s == 7) cout << "seven"; 14 | else if(s == 8) cout << "eight"; 15 | else if(s == 9) cout << "nine"; 16 | else cout << "Greater than 9"; 17 | return 0; 18 | } 19 | -------------------------------------------------------------------------------- /Language Proficiency/Cpp/Introduction/For Loop/c-tutorial-for-loop-English.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Lintik/hackerrank/2fa4fceded1706676da8c87606e2ac0283feae4d/Language Proficiency/Cpp/Introduction/For Loop/c-tutorial-for-loop-English.pdf -------------------------------------------------------------------------------- /Language Proficiency/Cpp/Introduction/Functions/c-tutorial-functions-English.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Lintik/hackerrank/2fa4fceded1706676da8c87606e2ac0283feae4d/Language Proficiency/Cpp/Introduction/Functions/c-tutorial-functions-English.pdf -------------------------------------------------------------------------------- /Language Proficiency/Cpp/Introduction/Functions/functions.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | using namespace std; 4 | 5 | int max_of_four(int a, int b, int c, int d){ 6 | return max(max(max(a,b), c), d); 7 | } 8 | 9 | int main() { 10 | int a, b, c, d; 11 | scanf("%d %d %d %d", &a, &b, &c, &d); 12 | int ans = max_of_four(a, b, c, d); 13 | printf("%d", ans); 14 | 15 | return 0; 16 | } 17 | -------------------------------------------------------------------------------- /Language Proficiency/Cpp/Introduction/Input and Output/cpp-input-and-output-English.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Lintik/hackerrank/2fa4fceded1706676da8c87606e2ac0283feae4d/Language Proficiency/Cpp/Introduction/Input and Output/cpp-input-and-output-English.pdf -------------------------------------------------------------------------------- /Language Proficiency/Cpp/Introduction/Input and Output/inputAndOutput.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | using namespace std; 3 | 4 | int main() { 5 | int a, b, c; 6 | cin >> a >> b >> c; 7 | cout << a + b + c; 8 | return 0; 9 | } 10 | -------------------------------------------------------------------------------- /Language Proficiency/Cpp/Introduction/Pointer/c-tutorial-pointer-English.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Lintik/hackerrank/2fa4fceded1706676da8c87606e2ac0283feae4d/Language Proficiency/Cpp/Introduction/Pointer/c-tutorial-pointer-English.pdf -------------------------------------------------------------------------------- /Language Proficiency/Cpp/Introduction/Pointer/pointer.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | void update(int *a,int *b) { 4 | int temp = *a; 5 | *a += *b; 6 | *b = temp > *b? temp - *b : *b - temp; 7 | } 8 | 9 | int main() { 10 | int a, b; 11 | int *pa = &a, *pb = &b; 12 | 13 | scanf("%d %d", &a, &b); 14 | update(pa, pb); 15 | printf("%d\n%d", a, b); 16 | 17 | return 0; 18 | } 19 | -------------------------------------------------------------------------------- /Language Proficiency/Cpp/Introduction/Say Hello World With Cpp/cpp-hello-world-English.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Lintik/hackerrank/2fa4fceded1706676da8c87606e2ac0283feae4d/Language Proficiency/Cpp/Introduction/Say Hello World With Cpp/cpp-hello-world-English.pdf -------------------------------------------------------------------------------- /Language Proficiency/Cpp/Introduction/Say Hello World With Cpp/sayHelloWorldWithCpp.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | using namespace std; 4 | 5 | int main() { 6 | printf("Hello, World!"); 7 | return 0; 8 | } 9 | -------------------------------------------------------------------------------- /Language Proficiency/Cpp/Introduction/Variable Sized Arrays/variable-sized-arrays-English.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Lintik/hackerrank/2fa4fceded1706676da8c87606e2ac0283feae4d/Language Proficiency/Cpp/Introduction/Variable Sized Arrays/variable-sized-arrays-English.pdf -------------------------------------------------------------------------------- /Language Proficiency/Cpp/Introduction/Variable Sized Arrays/variableSizedArrays.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | using namespace std; 3 | 4 | int main() { 5 | int n, q; 6 | cin >> n >> q; 7 | int* a[n]; 8 | for(int i = 0; i < n; i++){ 9 | int m; 10 | cin >> m; 11 | a[i] = new int[m]; 12 | for(int j = 0;j < m;j++){ 13 | cin >> a[i][j]; 14 | } 15 | } 16 | for(int i = 0;i < q;i++){ 17 | int x, y; 18 | cin >> x >> y; 19 | cout << a[x][y] << endl; 20 | } 21 | return 0; 22 | } 23 | -------------------------------------------------------------------------------- /Language Proficiency/Cpp/Other Concepts/Attending Workshops/attending-workshops-English.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Lintik/hackerrank/2fa4fceded1706676da8c87606e2ac0283feae4d/Language Proficiency/Cpp/Other Concepts/Attending Workshops/attending-workshops-English.pdf -------------------------------------------------------------------------------- /Language Proficiency/Cpp/Other Concepts/Attending Workshops/attendingWorkshops.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Lintik/hackerrank/2fa4fceded1706676da8c87606e2ac0283feae4d/Language Proficiency/Cpp/Other Concepts/Attending Workshops/attendingWorkshops.md -------------------------------------------------------------------------------- /Language Proficiency/Cpp/Other Concepts/Bit Array/bitset-1-English.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Lintik/hackerrank/2fa4fceded1706676da8c87606e2ac0283feae4d/Language Proficiency/Cpp/Other Concepts/Bit Array/bitset-1-English.pdf -------------------------------------------------------------------------------- /Language Proficiency/Cpp/Other Concepts/Cpp Class Template Specialization/cpp-class-template-specialization-English.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Lintik/hackerrank/2fa4fceded1706676da8c87606e2ac0283feae4d/Language Proficiency/Cpp/Other Concepts/Cpp Class Template Specialization/cpp-class-template-specialization-English.pdf -------------------------------------------------------------------------------- /Language Proficiency/Cpp/Other Concepts/Cpp Class Templates/c-class-templates-English.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Lintik/hackerrank/2fa4fceded1706676da8c87606e2ac0283feae4d/Language Proficiency/Cpp/Other Concepts/Cpp Class Templates/c-class-templates-English.pdf -------------------------------------------------------------------------------- /Language Proficiency/Cpp/Other Concepts/Cpp Variadics/cpp-variadics-English.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Lintik/hackerrank/2fa4fceded1706676da8c87606e2ac0283feae4d/Language Proficiency/Cpp/Other Concepts/Cpp Variadics/cpp-variadics-English.pdf -------------------------------------------------------------------------------- /Language Proficiency/Cpp/Other Concepts/Operator Overloading/operator-overloading-English.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Lintik/hackerrank/2fa4fceded1706676da8c87606e2ac0283feae4d/Language Proficiency/Cpp/Other Concepts/Operator Overloading/operator-overloading-English.pdf -------------------------------------------------------------------------------- /Language Proficiency/Cpp/Other Concepts/OtherConcepts.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Lintik/hackerrank/2fa4fceded1706676da8c87606e2ac0283feae4d/Language Proficiency/Cpp/Other Concepts/OtherConcepts.md -------------------------------------------------------------------------------- /Language Proficiency/Cpp/Other Concepts/Overload Operators/operator-overloading-English.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Lintik/hackerrank/2fa4fceded1706676da8c87606e2ac0283feae4d/Language Proficiency/Cpp/Other Concepts/Overload Operators/operator-overloading-English.pdf -------------------------------------------------------------------------------- /Language Proficiency/Cpp/Other Concepts/Preprocessor Solutions/preprocessor-solution-English.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Lintik/hackerrank/2fa4fceded1706676da8c87606e2ac0283feae4d/Language Proficiency/Cpp/Other Concepts/Preprocessor Solutions/preprocessor-solution-English.pdf -------------------------------------------------------------------------------- /Language Proficiency/Cpp/STL/Deque-STL/deque-stl-English.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Lintik/hackerrank/2fa4fceded1706676da8c87606e2ac0283feae4d/Language Proficiency/Cpp/STL/Deque-STL/deque-stl-English.pdf -------------------------------------------------------------------------------- /Language Proficiency/Cpp/STL/Lower Bound-STL/cpp-lower-bound-English.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Lintik/hackerrank/2fa4fceded1706676da8c87606e2ac0283feae4d/Language Proficiency/Cpp/STL/Lower Bound-STL/cpp-lower-bound-English.pdf -------------------------------------------------------------------------------- /Language Proficiency/Cpp/STL/Maps-STL/cpp-maps-English.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Lintik/hackerrank/2fa4fceded1706676da8c87606e2ac0283feae4d/Language Proficiency/Cpp/STL/Maps-STL/cpp-maps-English.pdf -------------------------------------------------------------------------------- /Language Proficiency/Cpp/STL/Print Pretty/prettyprint-English.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Lintik/hackerrank/2fa4fceded1706676da8c87606e2ac0283feae4d/Language Proficiency/Cpp/STL/Print Pretty/prettyprint-English.pdf -------------------------------------------------------------------------------- /Language Proficiency/Cpp/STL/STL.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Lintik/hackerrank/2fa4fceded1706676da8c87606e2ac0283feae4d/Language Proficiency/Cpp/STL/STL.md -------------------------------------------------------------------------------- /Language Proficiency/Cpp/STL/Sets-STL/cpp-sets-English.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Lintik/hackerrank/2fa4fceded1706676da8c87606e2ac0283feae4d/Language Proficiency/Cpp/STL/Sets-STL/cpp-sets-English.pdf -------------------------------------------------------------------------------- /Language Proficiency/Cpp/STL/Sets-STL/setsSTL.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | #include 5 | using namespace std; 6 | 7 | void setsSTL(set &s, int y, int x){ 8 | if(y==1) 9 | s.insert(x); 10 | else if(y==2) 11 | s.erase(x); 12 | else if(s.find(x) != s.end()) 13 | cout << "Yes" << endl; 14 | else 15 | cout << "No" << endl; 16 | } 17 | 18 | int main(){ 19 | int Q = 0; 20 | cin >> Q; 21 | set s; 22 | for(int i = 0;i < Q;i++){ 23 | int y = 0, x = 0; 24 | cin >> y >> x; 25 | setsSTL(s,y,x); 26 | } 27 | } -------------------------------------------------------------------------------- /Language Proficiency/Cpp/STL/Vector-Erase/vector-erase-English.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Lintik/hackerrank/2fa4fceded1706676da8c87606e2ac0283feae4d/Language Proficiency/Cpp/STL/Vector-Erase/vector-erase-English.pdf -------------------------------------------------------------------------------- /Language Proficiency/Cpp/STL/Vector-Sort/vector-sort-English.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Lintik/hackerrank/2fa4fceded1706676da8c87606e2ac0283feae4d/Language Proficiency/Cpp/STL/Vector-Sort/vector-sort-English.pdf -------------------------------------------------------------------------------- /Language Proficiency/Cpp/STL/Vector-Sort/vectorSort.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | using namespace std; 5 | 6 | vector sortVector(vector v){ 7 | //sort does not return the sorted array 8 | sort(v.begin(),v.end()); 9 | return v; 10 | } 11 | 12 | int main() { 13 | int N = 0; 14 | cin >> N; 15 | vector v(N); 16 | for(int i = 0; i < N;i++) 17 | cin >> v[i]; 18 | 19 | v = sortVector(v); 20 | for(auto i: v) 21 | cout << i << " "; 22 | return 0; 23 | } 24 | -------------------------------------------------------------------------------- /Language Proficiency/Cpp/Strings/Attribute Parser/attribute-parser-English.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Lintik/hackerrank/2fa4fceded1706676da8c87606e2ac0283feae4d/Language Proficiency/Cpp/Strings/Attribute Parser/attribute-parser-English.pdf -------------------------------------------------------------------------------- /Language Proficiency/Cpp/Strings/StringStream/c-tutorial-stringstream-English.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Lintik/hackerrank/2fa4fceded1706676da8c87606e2ac0283feae4d/Language Proficiency/Cpp/Strings/StringStream/c-tutorial-stringstream-English.pdf -------------------------------------------------------------------------------- /Language Proficiency/Cpp/Strings/Strings/c-tutorial-strings-English.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Lintik/hackerrank/2fa4fceded1706676da8c87606e2ac0283feae4d/Language Proficiency/Cpp/Strings/Strings/c-tutorial-strings-English.pdf -------------------------------------------------------------------------------- /Language Proficiency/Cpp/Strings/Strings/strings.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | using namespace std; 4 | 5 | int main() { 6 | string a, b; 7 | cin >> a >> b; 8 | cout << a.size() << ' ' << b.size() << endl; 9 | cout << a + b << endl; 10 | char t = a[0]; 11 | a[0] = b[0]; 12 | b[0] = t; 13 | cout << a + " " + b; 14 | 15 | return 0; 16 | } 17 | -------------------------------------------------------------------------------- /Language Proficiency/Java/Introduction/Java Currency Formatter/java-currency-formatter-English.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Lintik/hackerrank/2fa4fceded1706676da8c87606e2ac0283feae4d/Language Proficiency/Java/Introduction/Java Currency Formatter/java-currency-formatter-English.pdf -------------------------------------------------------------------------------- /Language Proficiency/Java/Introduction/Java Datatypes/java-datatypes-English.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Lintik/hackerrank/2fa4fceded1706676da8c87606e2ac0283feae4d/Language Proficiency/Java/Introduction/Java Datatypes/java-datatypes-English.pdf -------------------------------------------------------------------------------- /Language Proficiency/Java/Introduction/Java Date and Time/java-date-and-time-English.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Lintik/hackerrank/2fa4fceded1706676da8c87606e2ac0283feae4d/Language Proficiency/Java/Introduction/Java Date and Time/java-date-and-time-English.pdf -------------------------------------------------------------------------------- /Language Proficiency/Java/Introduction/Java End-of-file/code.java: -------------------------------------------------------------------------------- 1 | import java.io.*; 2 | import java.util.*; 3 | import java.text.*; 4 | import java.math.*; 5 | import java.util.regex.*; 6 | 7 | public class Solution { 8 | 9 | public static void main(String[] args) { 10 | /* Enter your code here. Read input from STDIN. Print output to STDOUT. Your class should be named Solution. */ 11 | Scanner sc = new Scanner(System.in); 12 | for(int i=1;sc.hasNextLine();i++){ 13 | System.out.print(i); 14 | System.out.print(' '); 15 | System.out.println(sc.nextLine()); 16 | } 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /Language Proficiency/Java/Introduction/Java End-of-file/java-end-of-file-English.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Lintik/hackerrank/2fa4fceded1706676da8c87606e2ac0283feae4d/Language Proficiency/Java/Introduction/Java End-of-file/java-end-of-file-English.pdf -------------------------------------------------------------------------------- /Language Proficiency/Java/Introduction/Java If-Else/java-if-else-English.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Lintik/hackerrank/2fa4fceded1706676da8c87606e2ac0283feae4d/Language Proficiency/Java/Introduction/Java If-Else/java-if-else-English.pdf -------------------------------------------------------------------------------- /Language Proficiency/Java/Introduction/Java Int to String/java-int-to-string-English.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Lintik/hackerrank/2fa4fceded1706676da8c87606e2ac0283feae4d/Language Proficiency/Java/Introduction/Java Int to String/java-int-to-string-English.pdf -------------------------------------------------------------------------------- /Language Proficiency/Java/Introduction/Java Loops I/code.java: -------------------------------------------------------------------------------- 1 | import java.io.*; 2 | import java.util.*; 3 | import java.text.*; 4 | import java.math.*; 5 | import java.util.regex.*; 6 | 7 | public class Solution { 8 | 9 | public static void main(String[] args) { 10 | Scanner in = new Scanner(System.in); 11 | int N = in.nextInt(); 12 | for(int i = 1;i<11;i++){ 13 | String t = String.format("%s x %s = %s",String.valueOf(N), String.valueOf(i), String.valueOf(N*i)); 14 | System.out.println(t); 15 | } 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /Language Proficiency/Java/Introduction/Java Loops I/java-loops-i-English.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Lintik/hackerrank/2fa4fceded1706676da8c87606e2ac0283feae4d/Language Proficiency/Java/Introduction/Java Loops I/java-loops-i-English.pdf -------------------------------------------------------------------------------- /Language Proficiency/Java/Introduction/Java Loops II/java-loops-English.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Lintik/hackerrank/2fa4fceded1706676da8c87606e2ac0283feae4d/Language Proficiency/Java/Introduction/Java Loops II/java-loops-English.pdf -------------------------------------------------------------------------------- /Language Proficiency/Java/Introduction/Java Output Formatting/java-output-formatting-English.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Lintik/hackerrank/2fa4fceded1706676da8c87606e2ac0283feae4d/Language Proficiency/Java/Introduction/Java Output Formatting/java-output-formatting-English.pdf -------------------------------------------------------------------------------- /Language Proficiency/Java/Introduction/Java Static Initializer Block/java-static-initializer-block-English.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Lintik/hackerrank/2fa4fceded1706676da8c87606e2ac0283feae4d/Language Proficiency/Java/Introduction/Java Static Initializer Block/java-static-initializer-block-English.pdf -------------------------------------------------------------------------------- /Language Proficiency/Java/Introduction/Java Stdin and Stdout I/code.java: -------------------------------------------------------------------------------- 1 | import java.util.*; 2 | 3 | public class Solution { 4 | 5 | public static void main(String[] args) { 6 | Scanner scan = new Scanner(System.in); 7 | int a = scan.nextInt(); 8 | // Complete this line 9 | int b = scan.nextInt(); 10 | // Complete this line 11 | int c = scan.nextInt(); 12 | 13 | System.out.println(a); 14 | // Complete this line 15 | System.out.println(b); 16 | // Complete this line 17 | System.out.println(c); 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /Language Proficiency/Java/Introduction/Java Stdin and Stdout I/java-stdin-and-stdout-1-English.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Lintik/hackerrank/2fa4fceded1706676da8c87606e2ac0283feae4d/Language Proficiency/Java/Introduction/Java Stdin and Stdout I/java-stdin-and-stdout-1-English.pdf -------------------------------------------------------------------------------- /Language Proficiency/Java/Introduction/Java Stdin and Stdout II/code.java: -------------------------------------------------------------------------------- 1 | import java.util.Scanner; 2 | 3 | public class Solution { 4 | 5 | public static void main(String[] args) { 6 | Scanner sc=new Scanner(System.in); 7 | int x=sc.nextInt(); 8 | double y=sc.nextDouble(); 9 | sc.nextLine(); 10 | String s=sc.nextLine(); 11 | 12 | 13 | System.out.println("String: "+s); 14 | System.out.println("Double: "+y); 15 | System.out.println("Int: "+x); 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /Language Proficiency/Java/Introduction/Java Stdin and Stdout II/java-stdin-stdout-English.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Lintik/hackerrank/2fa4fceded1706676da8c87606e2ac0283feae4d/Language Proficiency/Java/Introduction/Java Stdin and Stdout II/java-stdin-stdout-English.pdf -------------------------------------------------------------------------------- /Language Proficiency/Java/Introduction/Welcome to Java/code.java: -------------------------------------------------------------------------------- 1 | public class Solution { 2 | 3 | public static void main(String[] args) { 4 | /* Enter your code here. Print output to STDOUT. Your class should be named Solution. */ 5 | System.out.println("Hello, World."); 6 | System.out.println("Hello, Java."); 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /Language Proficiency/Java/Introduction/Welcome to Java/welcome-to-java-English.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Lintik/hackerrank/2fa4fceded1706676da8c87606e2ac0283feae4d/Language Proficiency/Java/Introduction/Welcome to Java/welcome-to-java-English.pdf -------------------------------------------------------------------------------- /Language Proficiency/Java/Strings/Java Anagrams/java-anagrams-English.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Lintik/hackerrank/2fa4fceded1706676da8c87606e2ac0283feae4d/Language Proficiency/Java/Strings/Java Anagrams/java-anagrams-English.pdf -------------------------------------------------------------------------------- /Language Proficiency/Java/Strings/Java Regex 2 - Duplicate Words/duplicate-word-English.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Lintik/hackerrank/2fa4fceded1706676da8c87606e2ac0283feae4d/Language Proficiency/Java/Strings/Java Regex 2 - Duplicate Words/duplicate-word-English.pdf -------------------------------------------------------------------------------- /Language Proficiency/Java/Strings/Java Regex/code.java: -------------------------------------------------------------------------------- 1 | import java.util.regex.Matcher; 2 | import java.util.regex.Pattern; 3 | import java.util.Scanner; 4 | 5 | class Solution{ 6 | 7 | public static void main(String[] args){ 8 | Scanner in = new Scanner(System.in); 9 | while(in.hasNext()){ 10 | String IP = in.next(); 11 | System.out.println(IP.matches(new MyRegex().pattern)); 12 | } 13 | 14 | } 15 | } 16 | class MyRegex{ 17 | String pattern = "^(25[0-5]|2[0-4]\\d|[0-1]?\\d?\\d)(\\.(25[0-5]|2[0-4]\\d|[0-1]?\\d?\\d)){3}$"; 18 | } 19 | -------------------------------------------------------------------------------- /Language Proficiency/Java/Strings/Java Regex/java-regex-English.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Lintik/hackerrank/2fa4fceded1706676da8c87606e2ac0283feae4d/Language Proficiency/Java/Strings/Java Regex/java-regex-English.pdf -------------------------------------------------------------------------------- /Language Proficiency/Java/Strings/Java String Reverse/code.java: -------------------------------------------------------------------------------- 1 | import java.io.*; 2 | import java.util.*; 3 | 4 | public class Solution { 5 | 6 | public static void main(String[] args) { 7 | 8 | Scanner sc=new Scanner(System.in); 9 | String A=sc.next(); 10 | /* Enter your code here. Print output to STDOUT. */ 11 | int l = A.length(); 12 | for(int i=0;i/your/ig' -------------------------------------------------------------------------------- /Language Proficiency/Linux Shell/Grep Sed Awk/sed-3.sh: -------------------------------------------------------------------------------- 1 | sed 's/\/{&}/ig' -------------------------------------------------------------------------------- /Language Proficiency/Linux Shell/Grep Sed Awk/sed-4.sh: -------------------------------------------------------------------------------- 1 | sed 's/[0-9]\+ /**** /g' -------------------------------------------------------------------------------- /Language Proficiency/Linux Shell/Grep Sed Awk/sed-5.sh: -------------------------------------------------------------------------------- 1 | sed -r 's/([0-9]{4} )([0-9]{4} )([0-9]{4} )([0-9]{4})/\4 \3\2\1/' -------------------------------------------------------------------------------- /Language Proficiency/Linux Shell/Text Processing/cut-1.sh: -------------------------------------------------------------------------------- 1 | cut -c3 -------------------------------------------------------------------------------- /Language Proficiency/Linux Shell/Text Processing/cut-2.1.sh: -------------------------------------------------------------------------------- 1 | cut -c2,7 -------------------------------------------------------------------------------- /Language Proficiency/Linux Shell/Text Processing/cut-2.sh: -------------------------------------------------------------------------------- 1 | while read line; do 2 | echo "${line:1:1}${line:6:1}" 3 | done -------------------------------------------------------------------------------- /Language Proficiency/Linux Shell/Text Processing/cut-3.sh: -------------------------------------------------------------------------------- 1 | cut -c2-7 -------------------------------------------------------------------------------- /Language Proficiency/Linux Shell/Text Processing/cut-4.sh: -------------------------------------------------------------------------------- 1 | cut -c1-4 -------------------------------------------------------------------------------- /Language Proficiency/Linux Shell/Text Processing/cut-5.sh: -------------------------------------------------------------------------------- 1 | cut -f1-3 -------------------------------------------------------------------------------- /Language Proficiency/Linux Shell/Text Processing/cut-6.sh: -------------------------------------------------------------------------------- 1 | cut -c13- -------------------------------------------------------------------------------- /Language Proficiency/Linux Shell/Text Processing/cut-7.sh: -------------------------------------------------------------------------------- 1 | cut -d ' ' -f4 -------------------------------------------------------------------------------- /Language Proficiency/Linux Shell/Text Processing/cut-8.sh: -------------------------------------------------------------------------------- 1 | cut -d ' ' -f1-3 -------------------------------------------------------------------------------- /Language Proficiency/Linux Shell/Text Processing/cut-9.sh: -------------------------------------------------------------------------------- 1 | cut -f2- -------------------------------------------------------------------------------- /Language Proficiency/Linux Shell/Text Processing/head_of_a_text_file-1.sh: -------------------------------------------------------------------------------- 1 | head -n 20 $1 -------------------------------------------------------------------------------- /Language Proficiency/Linux Shell/Text Processing/head_of_a_text_file-2.sh: -------------------------------------------------------------------------------- 1 | head -c 20 -------------------------------------------------------------------------------- /Language Proficiency/Linux Shell/Text Processing/middle_of_a_text_file.sh: -------------------------------------------------------------------------------- 1 | head -n 22 | tail -n 11 -------------------------------------------------------------------------------- /Language Proficiency/Linux Shell/Text Processing/paste-1.sh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Lintik/hackerrank/2fa4fceded1706676da8c87606e2ac0283feae4d/Language Proficiency/Linux Shell/Text Processing/paste-1.sh -------------------------------------------------------------------------------- /Language Proficiency/Linux Shell/Text Processing/paste-2.sh: -------------------------------------------------------------------------------- 1 | paste -d$';' - - - -------------------------------------------------------------------------------- /Language Proficiency/Linux Shell/Text Processing/paste-4.sh: -------------------------------------------------------------------------------- 1 | paste - - - -------------------------------------------------------------------------------- /Language Proficiency/Linux Shell/Text Processing/sort-1.sh: -------------------------------------------------------------------------------- 1 | sort -d -------------------------------------------------------------------------------- /Language Proficiency/Linux Shell/Text Processing/sort-2.sh: -------------------------------------------------------------------------------- 1 | sort -d -r -------------------------------------------------------------------------------- /Language Proficiency/Linux Shell/Text Processing/sort-3.sh: -------------------------------------------------------------------------------- 1 | sort -n -------------------------------------------------------------------------------- /Language Proficiency/Linux Shell/Text Processing/sort-4.sh: -------------------------------------------------------------------------------- 1 | sort -n -r -------------------------------------------------------------------------------- /Language Proficiency/Linux Shell/Text Processing/sort-5.sh: -------------------------------------------------------------------------------- 1 | sort -t$'\t' -k2 -rn -------------------------------------------------------------------------------- /Language Proficiency/Linux Shell/Text Processing/sort-6.sh: -------------------------------------------------------------------------------- 1 | sort -t$'\t' -k2 -n -------------------------------------------------------------------------------- /Language Proficiency/Linux Shell/Text Processing/tail_of_a_text_file-1.sh: -------------------------------------------------------------------------------- 1 | tail -n 20 -------------------------------------------------------------------------------- /Language Proficiency/Linux Shell/Text Processing/tail_of_a_text_file-2.sh: -------------------------------------------------------------------------------- 1 | tail -c 20 -------------------------------------------------------------------------------- /Language Proficiency/Linux Shell/Text Processing/tr-1.sh: -------------------------------------------------------------------------------- 1 | tr '()' '[]' -------------------------------------------------------------------------------- /Language Proficiency/Linux Shell/Text Processing/tr-2.sh: -------------------------------------------------------------------------------- 1 | tr -d [:lower:] -------------------------------------------------------------------------------- /Language Proficiency/Linux Shell/Text Processing/tr-3.sh: -------------------------------------------------------------------------------- 1 | tr -s ' ' -------------------------------------------------------------------------------- /Language Proficiency/Linux Shell/Text Processing/uniq-1.sh: -------------------------------------------------------------------------------- 1 | uniq -------------------------------------------------------------------------------- /Language Proficiency/Linux Shell/Text Processing/uniq-2.sh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Lintik/hackerrank/2fa4fceded1706676da8c87606e2ac0283feae4d/Language Proficiency/Linux Shell/Text Processing/uniq-2.sh -------------------------------------------------------------------------------- /Language Proficiency/Linux Shell/Text Processing/uniq-3.sh: -------------------------------------------------------------------------------- 1 | uniq -ci | cut -c7- -------------------------------------------------------------------------------- /Language Proficiency/Python/Basic Data Types/find_second_max_num.py3: -------------------------------------------------------------------------------- 1 | #!/bin/python3 2 | 3 | if __name__ == '__main__': 4 | n = int(input()) 5 | arr = map(int, input().split()) 6 | 7 | # reduce list to unique elements 8 | # sort the list 9 | # return the -2 element of the list 10 | m = sorted(set(arr)) 11 | print(m[-2]) 12 | 13 | # initialize the max and runner-up to min possible num 14 | # iterate throught the list 15 | # compare each element to max and runner-up 16 | 17 | -------------------------------------------------------------------------------- /Language Proficiency/Python/Basic Data Types/list_comprehensions.py3: -------------------------------------------------------------------------------- 1 | #!/bin/python3 2 | 3 | if __name__ == '__main__': 4 | x, y, z, n = (int(input()) for _ in range(4)) 5 | print ([[a,b,c] for a in range(0,x+1) for b in range(0,y+1) for c in range(0,z+1) if a + b + c != n ]) 6 | -------------------------------------------------------------------------------- /Language Proficiency/Python/Date and Time/calendar_module.py3: -------------------------------------------------------------------------------- 1 | #!/bin/python3 2 | 3 | import datetime 4 | 5 | print(datetime.datetime.strptime(input(), '%m %d %Y').strftime('%A').upper()) -------------------------------------------------------------------------------- /Language Proficiency/Python/Date and Time/time_delta.py3: -------------------------------------------------------------------------------- 1 | #!/bin/python3 2 | 3 | import math 4 | import os 5 | import random 6 | import re 7 | import sys 8 | 9 | # Complete the time_delta function below. 10 | def time_delta(t1, t2): 11 | 12 | if __name__ == '__main__': 13 | fptr = open(os.environ['OUTPUT_PATH'], 'w') 14 | 15 | t = int(input()) 16 | 17 | for t_itr in range(t): 18 | t1 = input() 19 | 20 | t2 = input() 21 | 22 | delta = time_delta(t1, t2) 23 | 24 | fptr.write(delta + '\n') 25 | 26 | fptr.close() 27 | -------------------------------------------------------------------------------- /Language Proficiency/Python/Introduction/arithmetic_operators.py3: -------------------------------------------------------------------------------- 1 | #!/bin/python3 2 | 3 | if __name__ == '__main__': 4 | a = int(input()) 5 | b = int(input()) 6 | print(a + b) 7 | print(a - b) 8 | print(a * b) -------------------------------------------------------------------------------- /Language Proficiency/Python/Introduction/helloworld.py3: -------------------------------------------------------------------------------- 1 | #!/bin/python3 2 | 3 | #print is now a function in python 3 4 | print("Hello, World!") -------------------------------------------------------------------------------- /Language Proficiency/Python/Introduction/loops.py3: -------------------------------------------------------------------------------- 1 | #!/bin/python3 2 | 3 | if __name__ == '__main__': 4 | n = int(input()) 5 | for i in range(n): 6 | print(i ** 2) 7 | -------------------------------------------------------------------------------- /Language Proficiency/Python/Introduction/print_function.py3: -------------------------------------------------------------------------------- 1 | #!/bin/python3 2 | 3 | if __name__ == '__main__': 4 | n = int(input()) 5 | print(*range(1,n + 1),sep='') 6 | 7 | -------------------------------------------------------------------------------- /Language Proficiency/Python/Introduction/py_division.py3: -------------------------------------------------------------------------------- 1 | #!/bin/python3 2 | 3 | if __name__ == '__main__': 4 | a = int(input()) 5 | b = int(input()) 6 | print("{}\n{}".format(a // b, a /b)) 7 | -------------------------------------------------------------------------------- /Language Proficiency/Python/Introduction/py_if-else.py3: -------------------------------------------------------------------------------- 1 | #!/bin/python3 2 | 3 | if __name__ == '__main__': 4 | n = int(input().strip()) 5 | if n % 2 == 1: 6 | print("Weird") 7 | elif n % 2 == 0 and n >= 2 and n <= 5: 8 | print("Not Weird") 9 | elif n % 2 == 0 and n >= 6 and n <= 20: 10 | print("Weird") 11 | else: 12 | print("Not Weird") -------------------------------------------------------------------------------- /Language Proficiency/Python/Introduction/write_a_function.py3: -------------------------------------------------------------------------------- 1 | #!/bin/python3 2 | 3 | def is_leap(year): 4 | leap = True if year % 4 == 0 and (year % 100 != 0 or year % 400 == 0) else False 5 | return leap 6 | 7 | year = int(input()) -------------------------------------------------------------------------------- /Specialized Skills/Databases/Indexes/Index Architecture Types/readme.md: -------------------------------------------------------------------------------- 1 | # Question 2 | 3 | How many index architecture type classifications are there in MS SQL Server? 4 | 5 | answer: 2 -------------------------------------------------------------------------------- /Specialized Skills/Databases/Indexes/Indexes - 2/readme.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Lintik/hackerrank/2fa4fceded1706676da8c87606e2ac0283feae4d/Specialized Skills/Databases/Indexes/Indexes - 2/readme.md -------------------------------------------------------------------------------- /Specialized Skills/Databases/Indexes/Indexes - 3/readme.md: -------------------------------------------------------------------------------- 1 | # Question 2 | 3 | Consider the following two designs to store the data using clustered indexes in MS SQL Server: 4 | 5 | + In the first design, the fill factor is 20% and the total number of free rows per page are A. 6 | 7 | + In the second design, the fill factor is 40% and the total number of free rows per page are B. 8 | 9 | Which the followings describes the relation between A and B: 10 | 11 | answer: A = 1.33B -------------------------------------------------------------------------------- /Specialized Skills/Databases/Indexes/Indexes - 4/readme.md: -------------------------------------------------------------------------------- 1 | # Question 2 | 3 | The correct syntax for creating composite indexes in MS SQL Sever is: 4 | 5 | + CREATE INDEX index_name
ON table_name(column1), table_name(column2); 6 | + CREATE INDEX index_name
ON table_name(column1, column2); 7 | + CREATE INDEX index_name
ON table_name(column1) and table_name(column2); 8 | + All the above-mentioned syntax are correct. 9 | 10 | answer:
CREATE INDEX index_name
ON table_name(column1, column2); -------------------------------------------------------------------------------- /Specialized Skills/Databases/NoSQL - XML, MapReduce/Map Reduce Advanced - Count number of friends/code.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Lintik/hackerrank/2fa4fceded1706676da8c87606e2ac0283feae4d/Specialized Skills/Databases/NoSQL - XML, MapReduce/Map Reduce Advanced - Count number of friends/code.py -------------------------------------------------------------------------------- /Specialized Skills/Databases/NoSQL - XML, MapReduce/Map Reduce Advanced - Count number of friends/map-reduce-advanced-count-number-of-friends-English.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Lintik/hackerrank/2fa4fceded1706676da8c87606e2ac0283feae4d/Specialized Skills/Databases/NoSQL - XML, MapReduce/Map Reduce Advanced - Count number of friends/map-reduce-advanced-count-number-of-friends-English.pdf -------------------------------------------------------------------------------- /Specialized Skills/Databases/OLAP/OLAP Cube Metadata/readme.md: -------------------------------------------------------------------------------- 1 | # Question 2 | What is the source of the cube metadata for OLAP? 3 | 4 | + Star Schema 5 | + Standard Database 6 | + Snowflake Schema 7 | + Both star and snowflake schema 8 | 9 | Asnwer: Both star and snowflake schema 10 | 11 | Explanation: -------------------------------------------------------------------------------- /Specialized Skills/Databases/OLAP/OLAP Name(s)/readme.md: -------------------------------------------------------------------------------- 1 | # Question 2 | 3 | Which of these are alternate names for an OLAP Cube? 4 | 5 | + Cube 6 | + HyperCube 7 | + Multidimensional Cube 8 | + Both Multidimensional and HyperCube 9 | 10 | Answer: Both Multidimensional and HyperCube 11 | 12 | Explanation: -------------------------------------------------------------------------------- /Specialized Skills/Databases/OLAP/OLAP Operations - 1/readme.md: -------------------------------------------------------------------------------- 1 | # Question 2 | 3 | This OLAP operation involves computing all of the data relationships for one or more dimensions. 4 | 5 | + dice 6 | + pivot 7 | + slice 8 | + roll-up 9 | 10 | Answer: roll-up 11 | 12 | Explanation: Roll up operation of OLAP involves computing all of the data relationships for one or more dimensions. Roll-up performs aggregation on a data cube in any of the following ways: 13 | + By climbing up a concept hierarchy for a dimension 14 | + By dimension reduction 15 | -------------------------------------------------------------------------------- /Specialized Skills/Databases/OLAP/OLAP Operations - 2/readme.md: -------------------------------------------------------------------------------- 1 | # Question 2 | 3 | This OLAP Operation rotates the data, and delivers an alternative to the original presentation. 4 | 5 | + pivot 6 | + roll-up 7 | + slice 8 | + dice 9 | 10 | Answer: pivot 11 | 12 | Explanation: Thi pivot operation is also known as rotation. It rotates the data in order to provide an alternative presentation of data -------------------------------------------------------------------------------- /Specialized Skills/Databases/OLAP/Olap Performance/readme.md: -------------------------------------------------------------------------------- 1 | # Question 2 | 3 | Which of these helps OLAP speed up queries, in terms of performance? 4 | 5 | + Dice 6 | + Aggregation 7 | 8 | Answer: Aggregation 9 | 10 | Explanation: -------------------------------------------------------------------------------- /Specialized Skills/Databases/OLAP/The Total View/readme.md: -------------------------------------------------------------------------------- 1 | # Questions 2 | 3 | Which of these provides a total view of the organization? 4 | 5 | + Olap 6 | + OLTP 7 | + Data Warehousing 8 | + Database 9 | 10 | Answer: Data Warehousing 11 | 12 | Explanation: -------------------------------------------------------------------------------- /Specialized Skills/Databases/Relational Algebra/Basics of Sets and Relations #1/basics-of-sets-and-relational-algebra-1-English.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Lintik/hackerrank/2fa4fceded1706676da8c87606e2ac0283feae4d/Specialized Skills/Databases/Relational Algebra/Basics of Sets and Relations #1/basics-of-sets-and-relational-algebra-1-English.pdf -------------------------------------------------------------------------------- /Specialized Skills/Databases/Relational Algebra/Basics of Sets and Relations #1/code.txt: -------------------------------------------------------------------------------- 1 | 8 -------------------------------------------------------------------------------- /Specialized Skills/Databases/Relational Algebra/Basics of Sets and Relations #2/basics-of-sets-and-relational-algebra-2-English.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Lintik/hackerrank/2fa4fceded1706676da8c87606e2ac0283feae4d/Specialized Skills/Databases/Relational Algebra/Basics of Sets and Relations #2/basics-of-sets-and-relational-algebra-2-English.pdf -------------------------------------------------------------------------------- /Specialized Skills/Databases/Relational Algebra/Basics of Sets and Relations #2/code.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Lintik/hackerrank/2fa4fceded1706676da8c87606e2ac0283feae4d/Specialized Skills/Databases/Relational Algebra/Basics of Sets and Relations #2/code.txt -------------------------------------------------------------------------------- /Specialized Skills/Databases/Relational Algebra/Basics of Sets and Relations #3/basics-of-sets-and-relational-algebra-3-English.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Lintik/hackerrank/2fa4fceded1706676da8c87606e2ac0283feae4d/Specialized Skills/Databases/Relational Algebra/Basics of Sets and Relations #3/basics-of-sets-and-relational-algebra-3-English.pdf -------------------------------------------------------------------------------- /Specialized Skills/Databases/Relational Algebra/Basics of Sets and Relations #3/code.txt: -------------------------------------------------------------------------------- 1 | 1 -------------------------------------------------------------------------------- /Specialized Skills/Databases/Relational Algebra/Basics of Sets and Relations #4/basics-of-sets-and-relational-algebra-4-English.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Lintik/hackerrank/2fa4fceded1706676da8c87606e2ac0283feae4d/Specialized Skills/Databases/Relational Algebra/Basics of Sets and Relations #4/basics-of-sets-and-relational-algebra-4-English.pdf -------------------------------------------------------------------------------- /Specialized Skills/Databases/Relational Algebra/Basics of Sets and Relations #4/code.txt: -------------------------------------------------------------------------------- 1 | 42 -------------------------------------------------------------------------------- /Specialized Skills/Databases/Relational Algebra/Basics of Sets and Relations #5/basics-of-sets-and-relational-algebra-5-English.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Lintik/hackerrank/2fa4fceded1706676da8c87606e2ac0283feae4d/Specialized Skills/Databases/Relational Algebra/Basics of Sets and Relations #5/basics-of-sets-and-relational-algebra-5-English.pdf -------------------------------------------------------------------------------- /Specialized Skills/Databases/Relational Algebra/Basics of Sets and Relations #5/code.txt: -------------------------------------------------------------------------------- 1 | 2 -------------------------------------------------------------------------------- /Specialized Skills/Databases/Relational Algebra/Basics of Sets and Relations #6/basics-of-sets-and-relational-algebra-6-English.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Lintik/hackerrank/2fa4fceded1706676da8c87606e2ac0283feae4d/Specialized Skills/Databases/Relational Algebra/Basics of Sets and Relations #6/basics-of-sets-and-relational-algebra-6-English.pdf -------------------------------------------------------------------------------- /Specialized Skills/Databases/Relational Algebra/Basics of Sets and Relations #6/code.txt: -------------------------------------------------------------------------------- 1 | 2 -------------------------------------------------------------------------------- /Specialized Skills/Databases/Relational Algebra/Basics of Sets and Relations #7/basics-of-sets-and-relational-algebra-7-English.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Lintik/hackerrank/2fa4fceded1706676da8c87606e2ac0283feae4d/Specialized Skills/Databases/Relational Algebra/Basics of Sets and Relations #7/basics-of-sets-and-relational-algebra-7-English.pdf -------------------------------------------------------------------------------- /Specialized Skills/Databases/Relational Algebra/Basics of Sets and Relations #7/code.txt: -------------------------------------------------------------------------------- 1 | 2 -------------------------------------------------------------------------------- /Specialized Skills/Databases/Relational Algebra/Database Query Languages/readme.md: -------------------------------------------------------------------------------- 1 | # Question 2 | 3 | Using which language can a user request information from a database ? 4 | 5 | + Query 6 | + Structural 7 | + Relational 8 | + Compiler 9 | 10 | Answer: Query 11 | 12 | Explanation: Query language is a method through which the database entries can be accessed. -------------------------------------------------------------------------------- /Specialized Skills/Databases/Relational Algebra/Prodedural Language/readme.md: -------------------------------------------------------------------------------- 1 | # Question 2 | 3 | Which one of the following is a procedural language ? 4 | 5 | answer: Relational Algebra 6 | -------------------------------------------------------------------------------- /Specialized Skills/Databases/Relational Algebra/Relational Algebra - 3/readme.md: -------------------------------------------------------------------------------- 1 | # Question 2 | 3 | Which is a join condition contains an equality operator? 4 | 5 | + Equijoins 6 | + Natural 7 | + Cartesian 8 | + Left 9 | 10 | Answer: Equijoins 11 | 12 | Explnation: An equi-join is a specific type of comparator-based join, that uses only equality comparisons in the join-predicate. -------------------------------------------------------------------------------- /Specialized Skills/Databases/Relational Algebra/Relational Algebra - 4/readme.md: -------------------------------------------------------------------------------- 1 | # Question 2 | 3 | In precedence of set operators the expression is evaluated from: 4 | 5 | + Depends on the Expression 6 | + Right to Left 7 | + Left to right 8 | + From user specification 9 | 10 | Answer: Left to right 11 | 12 | Explanation: The expression is evaluated from left to right according to the precedence. 13 | -------------------------------------------------------------------------------- /Specialized Skills/Databases/Relational Algebra/Relations - 1/readme.md: -------------------------------------------------------------------------------- 1 | # Question 2 | 3 | The ____ operation allows the combining of two relations by merging pairs of tuples, one from each relation, into a single tuple. 4 | 5 | + Select 6 | + Union 7 | + Join 8 | + Intersection 9 | 10 | Answer: join 11 | 12 | Explanation: Join finds the common tuple in the relations and combines it. -------------------------------------------------------------------------------- /Specialized Skills/Databases/Relational Algebra/Relations - 2/readme.md: -------------------------------------------------------------------------------- 1 | # Question 2 | 3 | The result which operation contains all pairs of tuples from the two relations, regardless of whether their attribute values match. 4 | 5 | + Join 6 | + Intersection 7 | + Cartesian Product 8 | + Set difference 9 | 10 | Answer: Cartesion product 11 | 12 | Explanation: Cartesian product is the multiplication of all the values in the attributes. -------------------------------------------------------------------------------- /Specialized Skills/Databases/Set and Algebra/Databases - Differences/code.txt: -------------------------------------------------------------------------------- 1 | 2 2 | 3 -------------------------------------------------------------------------------- /Specialized Skills/Databases/Set and Algebra/Databases - Differences/databases-differences-English.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Lintik/hackerrank/2fa4fceded1706676da8c87606e2ac0283feae4d/Specialized Skills/Databases/Set and Algebra/Databases - Differences/databases-differences-English.pdf -------------------------------------------------------------------------------- /Specialized Skills/Databases/Set and Algebra/Databases - Keys/code.txt: -------------------------------------------------------------------------------- 1 | bookname -------------------------------------------------------------------------------- /Specialized Skills/Databases/Set and Algebra/Databases - Keys/databases-keys-English.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Lintik/hackerrank/2fa4fceded1706676da8c87606e2ac0283feae4d/Specialized Skills/Databases/Set and Algebra/Databases - Keys/databases-keys-English.pdf -------------------------------------------------------------------------------- /Specialized Skills/Databases/Set and Algebra/Databases - Natural Joins/code.txt: -------------------------------------------------------------------------------- 1 | 50 2 | 1 3 | 6 -------------------------------------------------------------------------------- /Specialized Skills/Databases/Set and Algebra/Databases - Natural Joins/databases-natural-joins-English.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Lintik/hackerrank/2fa4fceded1706676da8c87606e2ac0283feae4d/Specialized Skills/Databases/Set and Algebra/Databases - Natural Joins/databases-natural-joins-English.pdf -------------------------------------------------------------------------------- /Specialized Skills/Databases/Set and Algebra/Databases - Relational Calculus/code.txt: -------------------------------------------------------------------------------- 1 | 19 -------------------------------------------------------------------------------- /Specialized Skills/Databases/Set and Algebra/Databases - Relational Calculus/databases-relational-calculus-English.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Lintik/hackerrank/2fa4fceded1706676da8c87606e2ac0283feae4d/Specialized Skills/Databases/Set and Algebra/Databases - Relational Calculus/databases-relational-calculus-English.pdf -------------------------------------------------------------------------------- /Specialized Skills/Functional Programming/Introduction/Area Under Curves and Volume of Revolving a Curve/area-under-curves-and-volume-of-revolving-a-curv-English.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Lintik/hackerrank/2fa4fceded1706676da8c87606e2ac0283feae4d/Specialized Skills/Functional Programming/Introduction/Area Under Curves and Volume of Revolving a Curve/area-under-curves-and-volume-of-revolving-a-curv-English.pdf -------------------------------------------------------------------------------- /Specialized Skills/Functional Programming/Introduction/Array of N Elements/code.fs: -------------------------------------------------------------------------------- 1 | open System 2 | 3 | let f n = [1..n] 4 | 5 | let main() = 6 | let input = Console.ReadLine() 7 | let n = int input 8 | printfn "%A" (f n) 9 | 10 | main() -------------------------------------------------------------------------------- /Specialized Skills/Functional Programming/Introduction/Array of N Elements/code.scala: -------------------------------------------------------------------------------- 1 | object Solution extends App { 2 | 3 | def f(num:Int) : List[Int] = { 4 | val list = List.range(0, num) 5 | return list 6 | } 7 | 8 | println(f(readInt)) -------------------------------------------------------------------------------- /Specialized Skills/Functional Programming/Introduction/Array of N Elements/fp-array-of-n-elements-English.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Lintik/hackerrank/2fa4fceded1706676da8c87606e2ac0283feae4d/Specialized Skills/Functional Programming/Introduction/Array of N Elements/fp-array-of-n-elements-English.pdf -------------------------------------------------------------------------------- /Specialized Skills/Functional Programming/Introduction/Compute the Area of a Polygon/lambda-march-compute-the-area-of-a-polygon-English.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Lintik/hackerrank/2fa4fceded1706676da8c87606e2ac0283feae4d/Specialized Skills/Functional Programming/Introduction/Compute the Area of a Polygon/lambda-march-compute-the-area-of-a-polygon-English.pdf -------------------------------------------------------------------------------- /Specialized Skills/Functional Programming/Introduction/Compute the Perimeter of a Polygon/lambda-march-compute-the-perimeter-of-a-polygon-English.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Lintik/hackerrank/2fa4fceded1706676da8c87606e2ac0283feae4d/Specialized Skills/Functional Programming/Introduction/Compute the Perimeter of a Polygon/lambda-march-compute-the-perimeter-of-a-polygon-English.pdf -------------------------------------------------------------------------------- /Specialized Skills/Functional Programming/Introduction/Evaluating e^x/eval-ex-English.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Lintik/hackerrank/2fa4fceded1706676da8c87606e2ac0283feae4d/Specialized Skills/Functional Programming/Introduction/Evaluating e^x/eval-ex-English.pdf -------------------------------------------------------------------------------- /Specialized Skills/Functional Programming/Introduction/Filter Array/code.fs: -------------------------------------------------------------------------------- 1 | open System 2 | 3 | let x = int(Console.ReadLine()) 4 | let i = Console.In.ReadToEnd().Split([|Environment.NewLine|], StringSplitOptions.RemoveEmptyEntries) |> Array.map (fun t-> int t) |> List.ofArray 5 | let rec filter values = 6 | match values with 7 | | [] -> [] 8 | | head::tail -> if head < x then head::(filter tail) else filter tail 9 | 10 | 11 | i |> filter |> List.iter (printfn "%d") -------------------------------------------------------------------------------- /Specialized Skills/Functional Programming/Introduction/Filter Array/code.scala: -------------------------------------------------------------------------------- 1 | def f(delim:Int,arr:List[Int]):List[Int] = arr.filter(_ < delim) -------------------------------------------------------------------------------- /Specialized Skills/Functional Programming/Introduction/Filter Array/fp-filter-array-English.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Lintik/hackerrank/2fa4fceded1706676da8c87606e2ac0283feae4d/Specialized Skills/Functional Programming/Introduction/Filter Array/fp-filter-array-English.pdf -------------------------------------------------------------------------------- /Specialized Skills/Functional Programming/Introduction/Filter Positions in a List/code.fs: -------------------------------------------------------------------------------- 1 | open System 2 | 3 | let readInputs() = 4 | Seq.initInfinite (fun _ -> Console.ReadLine()) 5 | |> Seq.takeWhile (fun s -> s <> null) 6 | 7 | [] 8 | let main argv = 9 | readInputs() 10 | |> Seq.mapi (fun i s -> i, int s) 11 | |> Seq.choose (fun (i, n) -> 12 | if i % 2 <> 0 then Some n else None) 13 | |> Seq.iter (printfn "%i") 14 | 0 -------------------------------------------------------------------------------- /Specialized Skills/Functional Programming/Introduction/Filter Positions in a List/code.scala: -------------------------------------------------------------------------------- 1 | def f(arr:List[Int]):List[Int] = arr.zipWithIndex.collect { case (a, i) if i % 2 == 1 => a } -------------------------------------------------------------------------------- /Specialized Skills/Functional Programming/Introduction/Filter Positions in a List/fp-filter-positions-in-a-list-English.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Lintik/hackerrank/2fa4fceded1706676da8c87606e2ac0283feae4d/Specialized Skills/Functional Programming/Introduction/Filter Positions in a List/fp-filter-positions-in-a-list-English.pdf -------------------------------------------------------------------------------- /Specialized Skills/Functional Programming/Introduction/Functions or Not/code.scala: -------------------------------------------------------------------------------- 1 | object Solution { 2 | def main(args: Array[String]) { 3 | val n = io.StdIn.readInt() 4 | (1 to n).foreach { i => 5 | val k = io.StdIn.readInt() 6 | val list = (1 to k).map(x => io.StdIn.readLine.split("\\s+")(0)).toList 7 | if (list.distinct.size == list.size) println("YES") 8 | else println("NO") 9 | } 10 | } 11 | } -------------------------------------------------------------------------------- /Specialized Skills/Functional Programming/Introduction/Functions or Not/functions-or-not-English.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Lintik/hackerrank/2fa4fceded1706676da8c87606e2ac0283feae4d/Specialized Skills/Functional Programming/Introduction/Functions or Not/functions-or-not-English.pdf -------------------------------------------------------------------------------- /Specialized Skills/Functional Programming/Introduction/Hello World N Times/code.fs: -------------------------------------------------------------------------------- 1 | let mutable r = System.Console.ReadLine() |> int 2 | while r > 0 do 3 | r <- r - 1 4 | printfn "Hello World" -------------------------------------------------------------------------------- /Specialized Skills/Functional Programming/Introduction/Hello World N Times/code.hs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Lintik/hackerrank/2fa4fceded1706676da8c87606e2ac0283feae4d/Specialized Skills/Functional Programming/Introduction/Hello World N Times/code.hs -------------------------------------------------------------------------------- /Specialized Skills/Functional Programming/Introduction/Hello World N Times/code.scala: -------------------------------------------------------------------------------- 1 | object Solution extends App { 2 | def f(n: Int) = Stream.fill(n)("Hello World") foreach {println} 3 | 4 | var n = scala.io.StdIn.readInt 5 | f(n) 6 | } -------------------------------------------------------------------------------- /Specialized Skills/Functional Programming/Introduction/Hello World N Times/fp-hello-world-n-times-English.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Lintik/hackerrank/2fa4fceded1706676da8c87606e2ac0283feae4d/Specialized Skills/Functional Programming/Introduction/Hello World N Times/fp-hello-world-n-times-English.pdf -------------------------------------------------------------------------------- /Specialized Skills/Functional Programming/Introduction/Hello World/code.fs: -------------------------------------------------------------------------------- 1 | printfn "Hello World" -------------------------------------------------------------------------------- /Specialized Skills/Functional Programming/Introduction/Hello World/code.hs: -------------------------------------------------------------------------------- 1 | -- Enter your code here. Read input from STDIN. Print output to STDOUT 2 | 3 | hello_world = putStrLn "Hello World"-- Fill up this function 4 | 5 | -- This part relates to Input/Output and can be used as it is. Do not modify this section 6 | main = do 7 | hello_world -------------------------------------------------------------------------------- /Specialized Skills/Functional Programming/Introduction/Hello World/code.scala: -------------------------------------------------------------------------------- 1 | def f() = println("Hello World") -------------------------------------------------------------------------------- /Specialized Skills/Functional Programming/Introduction/Hello World/fp-hello-world-English.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Lintik/hackerrank/2fa4fceded1706676da8c87606e2ac0283feae4d/Specialized Skills/Functional Programming/Introduction/Hello World/fp-hello-world-English.pdf -------------------------------------------------------------------------------- /Specialized Skills/Functional Programming/Introduction/Lambda Calculus - Evaluating Expressions 1/code.txt: -------------------------------------------------------------------------------- 1 | (λx.x+1)3 2 | 3 | = 4 -------------------------------------------------------------------------------- /Specialized Skills/Functional Programming/Introduction/Lambda Calculus - Evaluating Expressions 1/lambda-calculus-getting-started-English.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Lintik/hackerrank/2fa4fceded1706676da8c87606e2ac0283feae4d/Specialized Skills/Functional Programming/Introduction/Lambda Calculus - Evaluating Expressions 1/lambda-calculus-getting-started-English.pdf -------------------------------------------------------------------------------- /Specialized Skills/Functional Programming/Introduction/Lambda Calculus - Evaluating Expressions 2/code.txt: -------------------------------------------------------------------------------- 1 | (λx.x+1)((λy.y+2)3) 2 | 3 | = 6 -------------------------------------------------------------------------------- /Specialized Skills/Functional Programming/Introduction/Lambda Calculus - Evaluating Expressions 2/lambda-calculus-understanding-the-syntax-English.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Lintik/hackerrank/2fa4fceded1706676da8c87606e2ac0283feae4d/Specialized Skills/Functional Programming/Introduction/Lambda Calculus - Evaluating Expressions 2/lambda-calculus-understanding-the-syntax-English.pdf -------------------------------------------------------------------------------- /Specialized Skills/Functional Programming/Introduction/Lambda Calculus - Evaluating Expressions 3/code.txt: -------------------------------------------------------------------------------- 1 | λx.λy.(x^47)y 2 | 3 | = 47 -------------------------------------------------------------------------------- /Specialized Skills/Functional Programming/Introduction/Lambda Calculus - Evaluating Expressions 3/lambda-calculus-evaluate-the-expression-English.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Lintik/hackerrank/2fa4fceded1706676da8c87606e2ac0283feae4d/Specialized Skills/Functional Programming/Introduction/Lambda Calculus - Evaluating Expressions 3/lambda-calculus-evaluate-the-expression-English.pdf -------------------------------------------------------------------------------- /Specialized Skills/Functional Programming/Introduction/Lambda Calculus - Evaluating Expressions 4/code.txt: -------------------------------------------------------------------------------- 1 | λx.λy.x(xy) 2 | 3 | = 2 -------------------------------------------------------------------------------- /Specialized Skills/Functional Programming/Introduction/Lambda Calculus - Evaluating Expressions 4/lambda-calculus-evaluate-the-expression-1-English.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Lintik/hackerrank/2fa4fceded1706676da8c87606e2ac0283feae4d/Specialized Skills/Functional Programming/Introduction/Lambda Calculus - Evaluating Expressions 4/lambda-calculus-evaluate-the-expression-1-English.pdf -------------------------------------------------------------------------------- /Specialized Skills/Functional Programming/Introduction/Lambda Calculus - Evaluating Expressions 5/code.txt: -------------------------------------------------------------------------------- 1 | λx.λy.y 2 | 3 | = 0 -------------------------------------------------------------------------------- /Specialized Skills/Functional Programming/Introduction/Lambda Calculus - Evaluating Expressions 5/lambda-calculus-evaluate-the-expression-2-English.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Lintik/hackerrank/2fa4fceded1706676da8c87606e2ac0283feae4d/Specialized Skills/Functional Programming/Introduction/Lambda Calculus - Evaluating Expressions 5/lambda-calculus-evaluate-the-expression-2-English.pdf -------------------------------------------------------------------------------- /Specialized Skills/Functional Programming/Introduction/Lambda Calculus - Reductions 1/code.txt: -------------------------------------------------------------------------------- 1 | ((λx.(x y))(λz.z)) 2 | 3 | = (λx.(x y))(λz.z) 4 | = ((λz.z)y) 5 | = (λz.z)y 6 | = y -------------------------------------------------------------------------------- /Specialized Skills/Functional Programming/Introduction/Lambda Calculus - Reductions 1/lambda-calculus-reductions-1-English.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Lintik/hackerrank/2fa4fceded1706676da8c87606e2ac0283feae4d/Specialized Skills/Functional Programming/Introduction/Lambda Calculus - Reductions 1/lambda-calculus-reductions-1-English.pdf -------------------------------------------------------------------------------- /Specialized Skills/Functional Programming/Introduction/Lambda Calculus - Reductions 2/code.txt: -------------------------------------------------------------------------------- 1 | ((λx.((λy.(x y))x))(λz.w)) 2 | 3 | = ((λy.((λz.w) y))(λz.w)) 4 | = ((λz.w) (λz.w)) 5 | = (λz.w) 6 | = w -------------------------------------------------------------------------------- /Specialized Skills/Functional Programming/Introduction/Lambda Calculus - Reductions 2/lambda-calculus-reductions-2-English.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Lintik/hackerrank/2fa4fceded1706676da8c87606e2ac0283feae4d/Specialized Skills/Functional Programming/Introduction/Lambda Calculus - Reductions 2/lambda-calculus-reductions-2-English.pdf -------------------------------------------------------------------------------- /Specialized Skills/Functional Programming/Introduction/Lambda Calculus - Reductions 3/code.txt: -------------------------------------------------------------------------------- 1 | ((λx.(x x))(λx.(x x))) 2 | 3 | = (λx.(x x)) (λx.(x x)) 4 | = (λx.(x x)) (λy.(y y)) 5 | = (λy.(y y)) (λy.(y y)) 6 | = ... 7 | 8 | CAN'T REDUCE -------------------------------------------------------------------------------- /Specialized Skills/Functional Programming/Introduction/Lambda Calculus - Reductions 3/lambda-calculus-reductions-3-English.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Lintik/hackerrank/2fa4fceded1706676da8c87606e2ac0283feae4d/Specialized Skills/Functional Programming/Introduction/Lambda Calculus - Reductions 3/lambda-calculus-reductions-3-English.pdf -------------------------------------------------------------------------------- /Specialized Skills/Functional Programming/Introduction/Lambda Calculus - Reductions 4/code.txt: -------------------------------------------------------------------------------- 1 | (λg.((λf.((λx.(f (x x)))(λx.(f (x x))))) g)) 2 | 3 | (λg.(c g)) 4 | c = (λf.(b b)) 5 | b = (λx.(f (x x))) 6 | 7 | (λg.(b b)) 8 | b = (λx.(g (x x))) 9 | 10 | (g (b b)) 11 | (g (g (b b))) 12 | (g (g (g (b b)))) 13 | ... 14 | 15 | CAN'T REDUCE -------------------------------------------------------------------------------- /Specialized Skills/Functional Programming/Introduction/Lambda Calculus - Reductions 4/lambda-calculus-reductions-4-English.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Lintik/hackerrank/2fa4fceded1706676da8c87606e2ac0283feae4d/Specialized Skills/Functional Programming/Introduction/Lambda Calculus - Reductions 4/lambda-calculus-reductions-4-English.pdf -------------------------------------------------------------------------------- /Specialized Skills/Functional Programming/Introduction/List Length/code.fs: -------------------------------------------------------------------------------- 1 | open System 2 | 3 | let i = Console.In.ReadToEnd().Split([|Environment.NewLine|], StringSplitOptions.RemoveEmptyEntries) |> Array.map (fun t-> int t) |> List.ofArray 4 | 5 | printfn "%d" i.Length -------------------------------------------------------------------------------- /Specialized Skills/Functional Programming/Introduction/List Length/code.scala: -------------------------------------------------------------------------------- 1 | def f(arr:List[Int]):Int = arr.size -------------------------------------------------------------------------------- /Specialized Skills/Functional Programming/Introduction/List Length/fp-list-length-English.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Lintik/hackerrank/2fa4fceded1706676da8c87606e2ac0283feae4d/Specialized Skills/Functional Programming/Introduction/List Length/fp-list-length-English.pdf -------------------------------------------------------------------------------- /Specialized Skills/Functional Programming/Introduction/List Replication/code.fs: -------------------------------------------------------------------------------- 1 | open System 2 | 3 | [] 4 | let main args = 5 | let inputs = 6 | Seq.initInfinite (fun _ -> Console.ReadLine()) 7 | |> Seq.takeWhile (fun s -> s <> null) 8 | |> Seq.map int 9 | |> List.ofSeq 10 | 11 | 0 -------------------------------------------------------------------------------- /Specialized Skills/Functional Programming/Introduction/List Replication/code.hs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Lintik/hackerrank/2fa4fceded1706676da8c87606e2ac0283feae4d/Specialized Skills/Functional Programming/Introduction/List Replication/code.hs -------------------------------------------------------------------------------- /Specialized Skills/Functional Programming/Introduction/List Replication/code.scala: -------------------------------------------------------------------------------- 1 | def f(num:Int,arr:List[Int]):List[Int] = arr.flatMap(List.fill(num)(_)) -------------------------------------------------------------------------------- /Specialized Skills/Functional Programming/Introduction/List Replication/fp-list-replication-English.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Lintik/hackerrank/2fa4fceded1706676da8c87606e2ac0283feae4d/Specialized Skills/Functional Programming/Introduction/List Replication/fp-list-replication-English.pdf -------------------------------------------------------------------------------- /Specialized Skills/Functional Programming/Introduction/Reverse a List/code.fs: -------------------------------------------------------------------------------- 1 | open System 2 | 3 | let x = Console.In.ReadToEnd().Split([|Environment.NewLine|], StringSplitOptions.RemoveEmptyEntries) |> Array.map (fun t-> int t) |> List.ofArray 4 | let y = List.rev x 5 | 6 | y |> List.iter (printfn "%d") -------------------------------------------------------------------------------- /Specialized Skills/Functional Programming/Introduction/Reverse a List/code.scala: -------------------------------------------------------------------------------- 1 | def f(arr:List[Int]):List[Int] = arr.reverse -------------------------------------------------------------------------------- /Specialized Skills/Functional Programming/Introduction/Reverse a List/fp-reverse-a-list-English.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Lintik/hackerrank/2fa4fceded1706676da8c87606e2ac0283feae4d/Specialized Skills/Functional Programming/Introduction/Reverse a List/fp-reverse-a-list-English.pdf -------------------------------------------------------------------------------- /Specialized Skills/Functional Programming/Introduction/Solve Me First FP/code.fs: -------------------------------------------------------------------------------- 1 | open System 2 | 3 | [] 4 | let main argv = 5 | let a = Console.ReadLine() |> int 6 | let b = Console.ReadLine() |> int 7 | printfn "%d" (a+b) 8 | 0 // return an integer exit code -------------------------------------------------------------------------------- /Specialized Skills/Functional Programming/Introduction/Solve Me First FP/code.hs: -------------------------------------------------------------------------------- 1 | solveMeFirst a b = a + b 2 | 3 | main = do 4 | val1 <- readLn 5 | val2 <- readLn 6 | let sum = solveMeFirst val1 val2 7 | print sum -------------------------------------------------------------------------------- /Specialized Skills/Functional Programming/Introduction/Solve Me First FP/code.scala: -------------------------------------------------------------------------------- 1 | object Solution { 2 | 3 | def main(args: Array[String]) { 4 | println(io.Source.stdin.getLines().take(2).map(_.toInt).sum) 5 | } 6 | } 7 | 8 | -------------------------------------------------------------------------------- /Specialized Skills/Functional Programming/Introduction/Solve Me First FP/fp-solve-me-first-English.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Lintik/hackerrank/2fa4fceded1706676da8c87606e2ac0283feae4d/Specialized Skills/Functional Programming/Introduction/Solve Me First FP/fp-solve-me-first-English.pdf -------------------------------------------------------------------------------- /Specialized Skills/Functional Programming/Introduction/Sum of Odd Elements/code.fs: -------------------------------------------------------------------------------- 1 | open System 2 | 3 | (*USER CODE BEGIN*) 4 | let f arr = arr |> List.fold (fun s v -> if Math.Abs(v % 2) = 1 then s + v else s) 0 5 | (*USER CODE END*) 6 | 7 | let read_and_parse()= 8 | let mutable arr = [] 9 | let mutable buff = Console.ReadLine() 10 | while buff <> null do 11 | arr <- Int32.Parse(buff)::arr 12 | buff <- Console.ReadLine() 13 | arr 14 | 15 | let main = 16 | let arr = read_and_parse() 17 | printf "%A" <| f arr -------------------------------------------------------------------------------- /Specialized Skills/Functional Programming/Introduction/Sum of Odd Elements/code.scala: -------------------------------------------------------------------------------- 1 | def f(arr:List[Int]):Int = arr.filter(_ % 2 != 0).sum -------------------------------------------------------------------------------- /Specialized Skills/Functional Programming/Introduction/Sum of Odd Elements/fp-sum-of-odd-elements-English.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Lintik/hackerrank/2fa4fceded1706676da8c87606e2ac0283feae4d/Specialized Skills/Functional Programming/Introduction/Sum of Odd Elements/fp-sum-of-odd-elements-English.pdf -------------------------------------------------------------------------------- /Specialized Skills/Functional Programming/Introduction/Update List/code.fs: -------------------------------------------------------------------------------- 1 | open System 2 | let rec r x = if String.length x < 1 then [] else System.Int32.Parse(x) :: (r (Console.ReadLine()));; 3 | let xs = List.map (fun x -> abs x) (r (Console.ReadLine())) in xs |> List.iter (fun x -> Console.WriteLine(x));; -------------------------------------------------------------------------------- /Specialized Skills/Functional Programming/Introduction/Update List/code.scala: -------------------------------------------------------------------------------- 1 | def f(arr:List[Int]):List[Int] = arr.map(Math.abs) -------------------------------------------------------------------------------- /Specialized Skills/Functional Programming/Introduction/Update List/fp-update-list-English.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Lintik/hackerrank/2fa4fceded1706676da8c87606e2ac0283feae4d/Specialized Skills/Functional Programming/Introduction/Update List/fp-update-list-English.pdf -------------------------------------------------------------------------------- /Specialized Skills/README.md: -------------------------------------------------------------------------------- 1 | # Specialized Skills 2 | -------------------------------------------------------------------------------- /Specialized Skills/SQL/Basic Select/Revising the Select Query I/code.sql: -------------------------------------------------------------------------------- 1 | SELECT * FROM CITY 2 | WHERE CountryCode = "USA" and Population > 100000; 3 | -------------------------------------------------------------------------------- /Specialized Skills/SQL/Basic Select/Revising the Select Query I/revising-the-select-query-English.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Lintik/hackerrank/2fa4fceded1706676da8c87606e2ac0283feae4d/Specialized Skills/SQL/Basic Select/Revising the Select Query I/revising-the-select-query-English.pdf -------------------------------------------------------------------------------- /Tutorials/10 Days of Javascript/Day 0 - Data Types/js10-data-types-English.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Lintik/hackerrank/2fa4fceded1706676da8c87606e2ac0283feae4d/Tutorials/10 Days of Javascript/Day 0 - Data Types/js10-data-types-English.pdf -------------------------------------------------------------------------------- /Tutorials/10 Days of Javascript/Day 0 - Hello, World!/js10-hello-world-English.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Lintik/hackerrank/2fa4fceded1706676da8c87606e2ac0283feae4d/Tutorials/10 Days of Javascript/Day 0 - Hello, World!/js10-hello-world-English.pdf -------------------------------------------------------------------------------- /Tutorials/10 Days of Javascript/Day 1 - Arithmetic Operators/js10-arithmetic-operators-English.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Lintik/hackerrank/2fa4fceded1706676da8c87606e2ac0283feae4d/Tutorials/10 Days of Javascript/Day 1 - Arithmetic Operators/js10-arithmetic-operators-English.pdf -------------------------------------------------------------------------------- /Tutorials/10 Days of Javascript/Day 1 - Functions/js10-function-English.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Lintik/hackerrank/2fa4fceded1706676da8c87606e2ac0283feae4d/Tutorials/10 Days of Javascript/Day 1 - Functions/js10-function-English.pdf -------------------------------------------------------------------------------- /Tutorials/10 Days of Javascript/Day 1 - Let and Const/js10-let-and-const-English.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Lintik/hackerrank/2fa4fceded1706676da8c87606e2ac0283feae4d/Tutorials/10 Days of Javascript/Day 1 - Let and Const/js10-let-and-const-English.pdf -------------------------------------------------------------------------------- /Tutorials/10 Days of Javascript/Day 2 - Conditional Statements If-Else/js10-if-else-English.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Lintik/hackerrank/2fa4fceded1706676da8c87606e2ac0283feae4d/Tutorials/10 Days of Javascript/Day 2 - Conditional Statements If-Else/js10-if-else-English.pdf -------------------------------------------------------------------------------- /Tutorials/10 Days of Javascript/Day 2 - Conditional Statements Switch/js10-switch-English.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Lintik/hackerrank/2fa4fceded1706676da8c87606e2ac0283feae4d/Tutorials/10 Days of Javascript/Day 2 - Conditional Statements Switch/js10-switch-English.pdf -------------------------------------------------------------------------------- /Tutorials/10 Days of Javascript/Day 2 - Loops/js10-loops-English.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Lintik/hackerrank/2fa4fceded1706676da8c87606e2ac0283feae4d/Tutorials/10 Days of Javascript/Day 2 - Loops/js10-loops-English.pdf -------------------------------------------------------------------------------- /Tutorials/10 Days of Javascript/Day 3 - Arrays/js10-arrays-English.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Lintik/hackerrank/2fa4fceded1706676da8c87606e2ac0283feae4d/Tutorials/10 Days of Javascript/Day 3 - Arrays/js10-arrays-English.pdf -------------------------------------------------------------------------------- /Tutorials/10 Days of Javascript/Day 3 - Throw/js10-throw-English.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Lintik/hackerrank/2fa4fceded1706676da8c87606e2ac0283feae4d/Tutorials/10 Days of Javascript/Day 3 - Throw/js10-throw-English.pdf -------------------------------------------------------------------------------- /Tutorials/10 Days of Javascript/Day 3 - Try, Catch, and Finally/js10-try-catch-and-finally-English.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Lintik/hackerrank/2fa4fceded1706676da8c87606e2ac0283feae4d/Tutorials/10 Days of Javascript/Day 3 - Try, Catch, and Finally/js10-try-catch-and-finally-English.pdf -------------------------------------------------------------------------------- /Tutorials/10 Days of Javascript/Day 4 - Classes/js10-class-English.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Lintik/hackerrank/2fa4fceded1706676da8c87606e2ac0283feae4d/Tutorials/10 Days of Javascript/Day 4 - Classes/js10-class-English.pdf -------------------------------------------------------------------------------- /Tutorials/10 Days of Javascript/Day 4 - Count Objects/js10-count-objects-English.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Lintik/hackerrank/2fa4fceded1706676da8c87606e2ac0283feae4d/Tutorials/10 Days of Javascript/Day 4 - Count Objects/js10-count-objects-English.pdf -------------------------------------------------------------------------------- /Tutorials/10 Days of Javascript/Day 4 - Create a Rectangle Object/js10-objects-English.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Lintik/hackerrank/2fa4fceded1706676da8c87606e2ac0283feae4d/Tutorials/10 Days of Javascript/Day 4 - Create a Rectangle Object/js10-objects-English.pdf -------------------------------------------------------------------------------- /Tutorials/10 Days of Javascript/Day 5 - Arrow Functions/js10-arrows-English.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Lintik/hackerrank/2fa4fceded1706676da8c87606e2ac0283feae4d/Tutorials/10 Days of Javascript/Day 5 - Arrow Functions/js10-arrows-English.pdf -------------------------------------------------------------------------------- /Tutorials/10 Days of Javascript/Day 5 - Inheritance/js10-inheritance-English.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Lintik/hackerrank/2fa4fceded1706676da8c87606e2ac0283feae4d/Tutorials/10 Days of Javascript/Day 5 - Inheritance/js10-inheritance-English.pdf -------------------------------------------------------------------------------- /Tutorials/10 Days of Javascript/Day 5 - Template Literals/js10-template-literals-English.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Lintik/hackerrank/2fa4fceded1706676da8c87606e2ac0283feae4d/Tutorials/10 Days of Javascript/Day 5 - Template Literals/js10-template-literals-English.pdf -------------------------------------------------------------------------------- /Tutorials/10 Days of Javascript/Day 6 - Bitwise Operators/js10-bitwise-English.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Lintik/hackerrank/2fa4fceded1706676da8c87606e2ac0283feae4d/Tutorials/10 Days of Javascript/Day 6 - Bitwise Operators/js10-bitwise-English.pdf -------------------------------------------------------------------------------- /Tutorials/10 Days of Javascript/Day 6 - Javascript Dates/js10-date-English.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Lintik/hackerrank/2fa4fceded1706676da8c87606e2ac0283feae4d/Tutorials/10 Days of Javascript/Day 6 - Javascript Dates/js10-date-English.pdf -------------------------------------------------------------------------------- /Tutorials/10 Days of Javascript/Day 7 - Regular Expression I/js10-regexp-1-English.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Lintik/hackerrank/2fa4fceded1706676da8c87606e2ac0283feae4d/Tutorials/10 Days of Javascript/Day 7 - Regular Expression I/js10-regexp-1-English.pdf -------------------------------------------------------------------------------- /Tutorials/10 Days of Javascript/Day 7 - Regular Expression II/js10-regexp-2-English.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Lintik/hackerrank/2fa4fceded1706676da8c87606e2ac0283feae4d/Tutorials/10 Days of Javascript/Day 7 - Regular Expression II/js10-regexp-2-English.pdf -------------------------------------------------------------------------------- /Tutorials/10 Days of Javascript/Day 7 - Regular Expression III/js10-regexp-3-English.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Lintik/hackerrank/2fa4fceded1706676da8c87606e2ac0283feae4d/Tutorials/10 Days of Javascript/Day 7 - Regular Expression III/js10-regexp-3-English.pdf -------------------------------------------------------------------------------- /Tutorials/10 Days of Javascript/Day 8 - Buttons Container/css/buttonsGrid.css: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Lintik/hackerrank/2fa4fceded1706676da8c87606e2ac0283feae4d/Tutorials/10 Days of Javascript/Day 8 - Buttons Container/css/buttonsGrid.css -------------------------------------------------------------------------------- /Tutorials/10 Days of Javascript/Day 8 - Buttons Container/index.html: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Lintik/hackerrank/2fa4fceded1706676da8c87606e2ac0283feae4d/Tutorials/10 Days of Javascript/Day 8 - Buttons Container/index.html -------------------------------------------------------------------------------- /Tutorials/10 Days of Javascript/Day 8 - Buttons Container/js/buttonsGrid.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Lintik/hackerrank/2fa4fceded1706676da8c87606e2ac0283feae4d/Tutorials/10 Days of Javascript/Day 8 - Buttons Container/js/buttonsGrid.js -------------------------------------------------------------------------------- /Tutorials/10 Days of Javascript/Day 8 - Create a Button/css/button.css: -------------------------------------------------------------------------------- 1 | button { 2 | width: 96px; 3 | height: 48px; 4 | font-size: 24px; 5 | } -------------------------------------------------------------------------------- /Tutorials/10 Days of Javascript/Day 8 - Create a Button/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Button 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /Tutorials/10 Days of Javascript/Day 8 - Create a Button/js/button.js: -------------------------------------------------------------------------------- 1 | var incrementButton = document.createElement('button'); 2 | incrementButton.id = 'btn'; 3 | incrementButton.innerHTML = 0; 4 | document.body.appendChild(incrementButton); 5 | var i = 0; 6 | var btn = document.getElementById('btn'); 7 | btn.onclick = function() { 8 | i++; 9 | btn.innerHTML = i; 10 | }; -------------------------------------------------------------------------------- /Tutorials/10 Days of Javascript/Day 8 - Create a Button/js10-create-a-button-English.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Lintik/hackerrank/2fa4fceded1706676da8c87606e2ac0283feae4d/Tutorials/10 Days of Javascript/Day 8 - Create a Button/js10-create-a-button-English.pdf -------------------------------------------------------------------------------- /Tutorials/Interview Preparation Kit/Arrays/2D Array - DS/2d-array-English.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Lintik/hackerrank/2fa4fceded1706676da8c87606e2ac0283feae4d/Tutorials/Interview Preparation Kit/Arrays/2D Array - DS/2d-array-English.pdf -------------------------------------------------------------------------------- /Tutorials/Interview Preparation Kit/Arrays/2D Array - DS/code.py3: -------------------------------------------------------------------------------- 1 | #!/bin/python3 2 | import sys 3 | 4 | arr = [] 5 | for arr_i in range(6): 6 | arr_t = [int(arr_temp) for arr_temp in input().strip().split(' ')] 7 | arr.append(arr_t) 8 | n = [None]*16 9 | k = 0 10 | for i in range(4): 11 | for j in range(4): 12 | n[k] = arr[i][j] + arr[i][j+1] + arr[i][j+2] 13 | n[k] += arr[i+1][j+1] 14 | n[k] += arr[i+2][j] + arr[i+2][j+1] + arr[i+2][j+2] 15 | k+=1 16 | 17 | m = max(n) 18 | print(m) 19 | -------------------------------------------------------------------------------- /Tutorials/Interview Preparation Kit/Arrays/Array Manipulation/code.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | using namespace std; 5 | 6 | int main() { 7 | long int N, K, p, q, sum, i, j, max = 0, x = 0; 8 | 9 | cin >> N >> K; 10 | vector a(N + 1); 11 | 12 | for (i = 0; i < K; i++) { 13 | cin >> p >> q >> sum; 14 | a[p] += sum; 15 | if ((q + 1) <= N) 16 | a[q + 1] -= sum; 17 | } 18 | 19 | for (i = 1; i <= N; i++) { 20 | x = x + a[i]; 21 | if (max < x) 22 | max = x; 23 | } 24 | 25 | cout << max; 26 | return 0; 27 | } 28 | -------------------------------------------------------------------------------- /Tutorials/Interview Preparation Kit/Arrays/Array Manipulation/crush-English.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Lintik/hackerrank/2fa4fceded1706676da8c87606e2ac0283feae4d/Tutorials/Interview Preparation Kit/Arrays/Array Manipulation/crush-English.pdf -------------------------------------------------------------------------------- /Tutorials/Interview Preparation Kit/Arrays/Arrays Left Rotation/code.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | int main(){ 5 | int n, k, i, j; 6 | 7 | scanf("%d %d",&n,&k); 8 | int *a = malloc(sizeof(int) * n); 9 | int *b = malloc(sizeof(int) * n); 10 | 11 | for(int a_i = 0; a_i < n; a_i++) 12 | scanf("%d",&b[a_i]); 13 | 14 | for(i=0; i 2 | #include 3 | 4 | int cmpfunc(const void *a, const void *b){ 5 | return (*(int *)a - *(int *)b); 6 | } 7 | 8 | int main() 9 | { 10 | int n, m, c = 0; 11 | scanf("%d", &n); 12 | scanf("%d", &m); 13 | int *a; 14 | a = (int*)(malloc(sizeof(int)*n)); 15 | for(int i = 0; i < n;i++) 16 | scanf("%d", &a[i]); 17 | 18 | qsort(a, n, sizeof(int), cmpfunc); 19 | for(int i = 0; i < n && m > 0;i++){ 20 | if(m - a[i] > 0) 21 | c++; 22 | m -= a[i]; 23 | } 24 | printf("%d", c); 25 | } 26 | -------------------------------------------------------------------------------- /Tutorials/Interview Preparation Kit/Sorting/Mark and Toys/code.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | using namespace std; 3 | 4 | int main() 5 | { 6 | int n, m, c = 0; 7 | scanf("%d", &n); 8 | scanf("%d", &m); 9 | vector a(n); 10 | for (int i = 0; i < n; i++)scanf("%d", &a[i]); 11 | 12 | sort(a.begin(), a.end()); 13 | 14 | for (int i = 0; i < n && m > 0; i++) { 15 | if (m - a[i] > 0) 16 | c++; 17 | m -= a[i]; 18 | } 19 | printf("%d", c); 20 | } 21 | -------------------------------------------------------------------------------- /Tutorials/Interview Preparation Kit/Sorting/Mark and Toys/mark-and-toys-English.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Lintik/hackerrank/2fa4fceded1706676da8c87606e2ac0283feae4d/Tutorials/Interview Preparation Kit/Sorting/Mark and Toys/mark-and-toys-English.pdf -------------------------------------------------------------------------------- /Tutorials/Interview Preparation Kit/Sorting/Merge Sort Counting Inversions/code.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Lintik/hackerrank/2fa4fceded1706676da8c87606e2ac0283feae4d/Tutorials/Interview Preparation Kit/Sorting/Merge Sort Counting Inversions/code.js -------------------------------------------------------------------------------- /Tutorials/Interview Preparation Kit/Sorting/Sorting Bubble Sort/ctci-bubble-sort-English.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Lintik/hackerrank/2fa4fceded1706676da8c87606e2ac0283feae4d/Tutorials/Interview Preparation Kit/Sorting/Sorting Bubble Sort/ctci-bubble-sort-English.pdf -------------------------------------------------------------------------------- /Tutorials/Interview Preparation Kit/Sorting/Sorting Comparator/code.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Lintik/hackerrank/2fa4fceded1706676da8c87606e2ac0283feae4d/Tutorials/Interview Preparation Kit/Sorting/Sorting Comparator/code.c -------------------------------------------------------------------------------- /Tutorials/Interview Preparation Kit/Sorting/Sorting Comparator/code.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Lintik/hackerrank/2fa4fceded1706676da8c87606e2ac0283feae4d/Tutorials/Interview Preparation Kit/Sorting/Sorting Comparator/code.cs -------------------------------------------------------------------------------- /Tutorials/Interview Preparation Kit/Sorting/Sorting Comparator/code.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Lintik/hackerrank/2fa4fceded1706676da8c87606e2ac0283feae4d/Tutorials/Interview Preparation Kit/Sorting/Sorting Comparator/code.js -------------------------------------------------------------------------------- /Tutorials/Interview Preparation Kit/Sorting/Sorting Comparator/ctci-comparator-sorting-English.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Lintik/hackerrank/2fa4fceded1706676da8c87606e2ac0283feae4d/Tutorials/Interview Preparation Kit/Sorting/Sorting Comparator/ctci-comparator-sorting-English.pdf -------------------------------------------------------------------------------- /Tutorials/Interview Preparation Kit/String Manipulation/Strings Making Anagrams/code.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Lintik/hackerrank/2fa4fceded1706676da8c87606e2ac0283feae4d/Tutorials/Interview Preparation Kit/String Manipulation/Strings Making Anagrams/code.c -------------------------------------------------------------------------------- /Tutorials/Interview Preparation Kit/String Manipulation/Strings Making Anagrams/code.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Lintik/hackerrank/2fa4fceded1706676da8c87606e2ac0283feae4d/Tutorials/Interview Preparation Kit/String Manipulation/Strings Making Anagrams/code.cpp -------------------------------------------------------------------------------- /Tutorials/Interview Preparation Kit/Warm-up Challenges/Counting Valleys/code.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Lintik/hackerrank/2fa4fceded1706676da8c87606e2ac0283feae4d/Tutorials/Interview Preparation Kit/Warm-up Challenges/Counting Valleys/code.c -------------------------------------------------------------------------------- /Tutorials/Interview Preparation Kit/Warm-up Challenges/Counting Valleys/code.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Lintik/hackerrank/2fa4fceded1706676da8c87606e2ac0283feae4d/Tutorials/Interview Preparation Kit/Warm-up Challenges/Counting Valleys/code.js -------------------------------------------------------------------------------- /Tutorials/Interview Preparation Kit/Warm-up Challenges/Counting Valleys/code.py3: -------------------------------------------------------------------------------- 1 | import sys 2 | 3 | def solve(n, ar): 4 | depth = t = 0 5 | for i in ar: 6 | if i == 'U': 7 | depth += 1 8 | if depth == 0: 9 | t += 1 10 | else: 11 | depth -= 1 12 | return t 13 | 14 | n =int(input()) 15 | ar =input() 16 | 17 | result = solve(n,ar) 18 | print(result) -------------------------------------------------------------------------------- /Tutorials/Interview Preparation Kit/Warm-up Challenges/Counting Valleys/counting-valleys-English.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Lintik/hackerrank/2fa4fceded1706676da8c87606e2ac0283feae4d/Tutorials/Interview Preparation Kit/Warm-up Challenges/Counting Valleys/counting-valleys-English.pdf -------------------------------------------------------------------------------- /Tutorials/Interview Preparation Kit/Warm-up Challenges/Jumping on the Clouds/jumping-on-the-clouds-English.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Lintik/hackerrank/2fa4fceded1706676da8c87606e2ac0283feae4d/Tutorials/Interview Preparation Kit/Warm-up Challenges/Jumping on the Clouds/jumping-on-the-clouds-English.pdf -------------------------------------------------------------------------------- /Tutorials/Interview Preparation Kit/Warm-up Challenges/README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Lintik/hackerrank/2fa4fceded1706676da8c87606e2ac0283feae4d/Tutorials/Interview Preparation Kit/Warm-up Challenges/README.md -------------------------------------------------------------------------------- /Tutorials/Interview Preparation Kit/Warm-up Challenges/Repeated String/code.py3: -------------------------------------------------------------------------------- 1 | #!/bin/python3 2 | 3 | import math 4 | import os 5 | import random 6 | import re 7 | import sys 8 | 9 | # Complete the repeatedString function below. 10 | def repeatedString(s, n): 11 | return s.count("a") * (n // len(s)) + s[:n % len(s)].count("a") 12 | 13 | if __name__ == '__main__': 14 | fptr = open(os.environ['OUTPUT_PATH'], 'w') 15 | 16 | s = input() 17 | 18 | n = int(input()) 19 | 20 | result = repeatedString(s, n) 21 | 22 | fptr.write(str(result) + '\n') 23 | 24 | fptr.close() -------------------------------------------------------------------------------- /Tutorials/Interview Preparation Kit/Warm-up Challenges/Repeated String/repeated-string-English.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Lintik/hackerrank/2fa4fceded1706676da8c87606e2ac0283feae4d/Tutorials/Interview Preparation Kit/Warm-up Challenges/Repeated String/repeated-string-English.pdf -------------------------------------------------------------------------------- /Tutorials/Interview Preparation Kit/Warm-up Challenges/Sock Merchant/code.py3: -------------------------------------------------------------------------------- 1 | #!/bin/python3 2 | 3 | import sys 4 | import math 5 | 6 | def sockMerchant(n, ar): 7 | # Complete this function 8 | ar.sort() 9 | t=0 10 | c=1 11 | prev = ar[0] 12 | for i in range(1,n): 13 | if(prev == ar[i]): c+=1 14 | else: 15 | t+=math.floor(c/2) 16 | c=1 17 | prev=ar[i] 18 | 19 | t+=math.floor(c/2) 20 | return t 21 | 22 | n = int(input().strip()) 23 | ar = list(map(int, input().strip().split(' '))) 24 | result = sockMerchant(n, ar) 25 | print(result) 26 | -------------------------------------------------------------------------------- /Tutorials/Interview Preparation Kit/Warm-up Challenges/Sock Merchant/sock-merchant-English.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Lintik/hackerrank/2fa4fceded1706676da8c87606e2ac0283feae4d/Tutorials/Interview Preparation Kit/Warm-up Challenges/Sock Merchant/sock-merchant-English.pdf -------------------------------------------------------------------------------- /Tutorials/README.md: -------------------------------------------------------------------------------- 1 | # Tutotials 2 | 3 | ## Interview Preparation Kit 4 | 5 | + Arrays 6 | + Dictionaries and Hashmaps 7 | + Sorting 8 | + String Manipulation 9 | + Greedy 10 | + Search 11 | + Dynamic Programming 12 | + Stacks and Queues 13 | + Graphs 14 | + Trees 15 | + Linked Lists 16 | + Recursion and Backtracking 17 | + Miscellaneous --------------------------------------------------------------------------------